-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sequence points when there is no size/scale change.
This code currently requests LayerTreeHostImpl to allocate a new LocalSurfaceId, but this is incorrect. Currently, all callers of InsertSequencePoint do so after doing nothing (no synchronization needed), or changing the size or scale. If the size or scale is changed, UpdateCompositorScaleAndSize is called which increments the parent ID of WindowTreeHost's window, so this is working by coincidence. There seems to be a parent/child relationship between WindowTreeHost's window and LayerTreeHostImpl. Currently, we request LayerTreeHostImpl to allocate a new child ID, which does nothing since the parent ID is set as the sequence ID. This change forces a reallocation of the parent ID for WindowTreeHost's window. LayerTreeHostImpl needs to sync its LocalSurfaceId with the parent LocalSurfaceId, updating the parent ID which is later sent in the CompositorFrame. This should ensure proper synchronisation. It also renames InsertSequencePoint to OnStateUpdate and passes the state that has changed into it. OnStateUpdate is responsible for applying the state and inserting a sequence point if necessary. Further, this updates the sequence IDs used to be the new (inserted) LocalSurfaceId parent ID, rather than the previous one. This is because we now have access to the new parent ID immediately. The current (incorrect) code requests the impl thread to update its child ID, which wasn't immediately available. Bug: 1278651 Test: Manually using raster scale changes Change-Id: Ia38f7ff65805dd6fdf9c25da81f9a1dc1d094882 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4194913 Reviewed-by: ccameron chromium <ccameron@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Eliot Courtney <edcourtney@chromium.org> Cr-Commit-Position: refs/heads/main@{#1100946}
- Loading branch information
Eliot Courtney
authored and
Chromium LUCI CQ
committed
Feb 3, 2023
1 parent
4953deb
commit a361313
Showing
13 changed files
with
126 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters