[GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Nov 2015 08:31:16 +0000 (08:31 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Nov 2015 08:31:16 +0000 (08:31 +0000)
commit093a2617a26796ee0d74f211b1f0a770168061e7
tree9f9c59f9cf93d23341186bc7a326f8bd31c43214
parent300a58a4863f0257b38a32cb86738f4f0948f82b
[GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=150756

Reviewed by Darin Adler.

Use a RunLoop::Timer instead of a GMainLoopSource for the
accelerated compositing render loop to improve the performance,
since RunLoop::Timer uses a persistent source.
All the logic to schedule rames has been moved to a helper
internal class RenderFrameScheduler.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
(WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::renderFrame):
(WebKit::LayerTreeHostGtk::scheduleLayerFlush):
(WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h