里傲曹 has uploaded the change for review![Open in Gerrit]()
Commit message
viz: ignore source id until ExternalBeginFrameSourceMojo is bound
ExternalBeginFrameSourceMojo previously initialized |original_source_id_|
to BeginFrameArgs::kStartingSourceId. That allowed not-yet-activated
instances to observe source_id 0 begin frames before they had been
bound to a real external source.
In multi-window external begin frame setups, those unbound instances
could incorrectly claim unrelated frames and pollute
|pending_frame_sinks_|, which can prevent the pending callback/ack
flow from draining correctly.
Store |original_source_id_| as std::optional<uint64_t> instead and only
track FrameSink begin/finish notifications after a source id has been
explicitly established by IssueExternalBeginFrame().
Add unit tests covering both the unbound case and the bound source-id
matching behavior.
Bug: 516336135
Test: viz_unittests --gtest_filter=ExternalBeginFrameSourceMojoTest.*
Change-Id: I407f9a1701598e577870a51bc54a6f049b8accb4
Change information
Files:
- M components/viz/service/BUILD.gn
- M components/viz/service/frame_sinks/external_begin_frame_source_mojo.cc
- M components/viz/service/frame_sinks/external_begin_frame_source_mojo.h
- A components/viz/service/frame_sinks/external_begin_frame_source_mojo_unittest.cc
Change size: M
Delta: 4 files changed, 90 insertions(+), 3 deletions(-)
Open in GerritRelated details
Attention set is empty
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I407f9a1701598e577870a51bc54a6f049b8accb4
Gerrit-Change-Number: 7867519
Gerrit-PatchSet: 1