Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky test ShellSurfacePresentationTimeRecorderTest.RecorderDestr…
…oyedBeforePresent. Why is the previous code flaky (with AutoNeedsBeginFrame feature enabled)? The root_surface submits two frames in this test case. If both frames are submitted before the first DrawAndSwap, the test will pass. Because frame 2 activation at the viz side will discard frame 1, which will send back presentation feedback for frame 1. And then DrawAndSwap will cause presentation feedback for frame 2. On the other hand, if a DrawAndSwap happens between frame 1 and frame 2, it will cause presentation feedback for frame 1. Later frame 2 arrives. Since it has no damage, the next DrawAndSwap decides that it doesn't need to draw, which also means it won't trigger presentation feedback. The feedback could be triggered by the next frame submission, but in this test there isn't a third frame. Why is the previous code *not* flaky, if AutoNeedsBeginFrame is disabled (while ReactiveFrameSubmission enabled)? That is because without AutoNeedsBeginFrame, there won't be unsolicited frame submission. Instead, it needs to wait for BeginFrame to submit. Without running a RunLoop to receive BeginFrame events, frame 1 will be discarded at the Exo side directly when frame 2 is submitted. Bug: 1489140 Change-Id: Ia3c989eb78e4a985c96a908583f0ac2c78a976f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4940009 Commit-Queue: Jonathan Ross <jonross@chromium.org> Reviewed-by: Jonathan Ross <jonross@chromium.org> Cr-Commit-Position: refs/heads/main@{#1209856}
- Loading branch information