Title: [205484] trunk/Source/WebKit2
Revision
205484
Author
[email protected]
Date
2016-09-06 09:26:05 -0700 (Tue, 06 Sep 2016)

Log Message

[Threaded Compositor] Update timer should have lower priority than tasks scheduled in compositing thread
https://bugs.webkit.org/show_bug.cgi?id=161625

Reviewed by Sergio Villar Senin.

This way, if a resize is scheduled, for example, and there are pending updates, the resize will happen first,
and then the updates will happen at the right size.

* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop): Use G_PRIORITY_HIGH_IDLE as update timer priority. The actual
priority doesn't really matter as long as it's lower than G_PRIORITY_DEFAULT, because there are only two
possible sources in the compositing run loop, one for the tasks scheduled, and another one for the update timer.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (205483 => 205484)


--- trunk/Source/WebKit2/ChangeLog	2016-09-06 16:24:02 UTC (rev 205483)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-06 16:26:05 UTC (rev 205484)
@@ -1,3 +1,18 @@
+2016-09-06  Carlos Garcia Campos  <[email protected]>
+
+        [Threaded Compositor] Update timer should have lower priority than tasks scheduled in compositing thread
+        https://bugs.webkit.org/show_bug.cgi?id=161625
+
+        Reviewed by Sergio Villar Senin.
+
+        This way, if a resize is scheduled, for example, and there are pending updates, the resize will happen first,
+        and then the updates will happen at the right size.
+
+        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
+        (WebKit::CompositingRunLoop::CompositingRunLoop): Use G_PRIORITY_HIGH_IDLE as update timer priority. The actual
+        priority doesn't really matter as long as it's lower than G_PRIORITY_DEFAULT, because there are only two
+        possible sources in the compositing run loop, one for the tasks scheduled, and another one for the update timer.
+
 2016-09-06  Emanuele Aina  <[email protected]>
 
         [GTK] glImageTargetTexture2D() is a GL function, rename accordingly

Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp (205483 => 205484)


--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp	2016-09-06 16:24:02 UTC (rev 205483)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp	2016-09-06 16:26:05 UTC (rev 205484)
@@ -33,6 +33,10 @@
 #include <wtf/NeverDestroyed.h>
 #include <wtf/WorkQueue.h>
 
+#if USE(GLIB_EVENT_LOOP)
+#include <glib.h>
+#endif
+
 namespace WebKit {
 
 class WorkQueuePool {
@@ -108,6 +112,9 @@
     : m_updateTimer(WorkQueuePool::singleton().runLoop(this), this, &CompositingRunLoop::updateTimerFired)
     , m_updateFunction(WTFMove(updateFunction))
 {
+#if USE(GLIB_EVENT_LOOP)
+    m_updateTimer.setPriority(G_PRIORITY_HIGH_IDLE);
+#endif
 }
 
 CompositingRunLoop::~CompositingRunLoop()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to