Issue metadata
Sign in to add a comment
|
Change EventHandler timers to be driven by BeginFrame updates |
||||||||||||||||||||||||
Issue descriptionEventHandler currently has three timers: - Hover timer: this seems to triggered by entering/exiting fullscreen. It's not clear why this is on a timer. - Cursor update timer: runs at 50Hz - Active timer: triggered by gesture processing so that the active state remains for a few frames if a tap arrives shortly after showprocess. In https://codereview.chromium.org/2514733003/, it's suggested that we should migrate these from timers into normal BeginFrame updates.
,
Nov 26 2016
Re: hover. As far as I can tell, the only parts of the codepath using this timer are fullscreen and detaching the layout object for a hovered node. Re: active. Right, I should have clarified, but we'd need to still store some timestamp and compare when generating the next frame.
,
Nov 28 2016
Code-wise, what does "driven by BeginFrame updates" amount to? I'm working on changes to fullscreen to synchronize state changes and events with animation frames, and it's possible I should use the same mechanism? (As it is, I've introduced a Document::enqueueAnimationFrameTask that's run after the animation frame-aligned events.)
,
Nov 28 2016
It essentially comes down to integrating your code into a specific stage in the document lifecycle[1] (sadly that enum is missing a couple of stages like animation). Assuming Document::enqueueAnimationFrameTask is driven by PageAnimator, it sounds like a good way to achieve this. [1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/DocumentLifecycle.h?rcl=1480306658&l=46
,
Nov 28 2016
https://codereview.chromium.org/2536643002 depends on earlier unfinished CLs and doesn't have tests, but shows the general idea, it's part of ScriptedAnimationController, but I see that's triggered by PageAnimator::serviceScriptedAnimations so that might also work. It's not defined by the specs, but I think it'd be good if the resize event is fired before the fullscreenchange events, since this is the actual order of things.
,
Nov 28 2016
That seems like a good starting point. I think we want to be a bit selective about which tasks we allow in there since they're generally running on the critical path, but I think that's a definitely a big improvement over randomly firing timers.
,
Aug 14 2017
,
Aug 14
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 15
This still needs to happen.
,
Aug 15
,
Aug 16
,
Dec 4
David, Chris, Lan I guess this bug also refers to the same problem for hover states we were looking into.
,
Dec 4
I think this is identical, lets merge this into the newer bug |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by rbyers@chromium.org
, Nov 26 2016Labels: Hotlist-Input-Dev