Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r177144 - [GTK] Timers might never be fired during animations
https://bugs.webkit.org/show_bug.cgi?id=139062 Reviewed by Martin Robinson. This can happen in old/slow machines where the time to render layers might take more than 0.016. Since the layer flush timer is using a higher priority than WebCore timers, when scheduling all (or several) layer flushes immediately, no other sources with lower priority are dispatched in the main loop. We could detect if we are scheduling layer flushes immediately for too long (100ms) and schedule the next flush after a delay to ensure other sources with lower priority have a chance to be dispatched. Also use a lower priority, GDK_PRIORITY_EVENTS is too high, so we use GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename m_lastFlushTime as m_lastImmediateFlushTime. (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the fireTime before calling flushAndRenderLayers() and compute the next flush delay based on the elapsed time using monotonically increasing time instead of current time. Use the target delay as next flush delay if we have scheduled flushes immediately for more than 100ms. (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the layer flush time here, it's done in layerFlushTimerFired() so that we don't need to keep it as a member. (WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global layerFlushTimerPriority. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Canonical link: https://commits.webkit.org/154760.279@webkitgtk/2.6 git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@178348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
ee7d3ac
commit 857f149
Showing
3 changed files
with
70 additions
and
9 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