-
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.
Recreate DirectManipulationHelper when every LRWHH UpdateParent
This is a reland of 7da0707 and d77c502 Compositor and window event target is associated with window's parent. We call LRWHH UpdateParent when window's parent update, includes window's parent actually update and window initialize. Recreate DirectManipulationHelper on every window's parent update helps keep DirectManipulationHelper lifecycle tracking simpler. We also make CompositorAnimationObserver owned by DirectManipulationHelper. With this changes, we start the DirectManipulation event polling when DirectManipulationHelper created and stop when it destroyed. The issue should be fix since event polling start no more depends on DM_POINTERHITTEST. This CL also includes 3 refactoring changes: 1. Move CompositorAnimationObserver into DirectManipulationHelper. 2. Call ZoomToRect to reset viewport of DirectManipulation when viewport is actually transformed in RUNNING - READAY sequence. 3. Pass the viewport size to DMEventHandler and use it to reset viewport at gesture end. The original changes caused a regression that browser UI composition keeps ticking begin frames. We register DirectManipulationHelperWin as an AnimationObserver of ui::Compositor. UI compositor will ask for begin frames as long as it has an AnimationObserver. We should call OnCompositorShuttingDown() when the compositor is going Idle. Therefore, I added a IDirectManipulationInteractionEventHandler that adds the observer when a manipulation begins, and removes it when manipulation ends. After my fix, we start the DirectManipulation event polling when DirectManipulation interaction begin and stop when DirectManipulation interaction end. Bug: 914914 Change-Id: I9f59381bdcc6e4ed0970003d87b26ac750bfb42d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1689922 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Siye Liu <siliu@microsoft.com> Cr-Commit-Position: refs/heads/master@{#686111}
- Loading branch information
Showing
8 changed files
with
198 additions
and
286 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
Oops, something went wrong.