[chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 04:03:24 +0000 (04:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 04:03:24 +0000 (04:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68967

Patch by James Robinson <jamesr@chromium.org> on 2011-09-27
Reviewed by Kenneth Russell.

When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as
opposed to only a redraw).

Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true.

* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp

index 4554567..653b1c6 100644 (file)
@@ -1,3 +1,18 @@
+2011-09-27  James Robinson  <jamesr@chromium.org>
+
+        [chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested
+        https://bugs.webkit.org/show_bug.cgi?id=68967
+
+        Reviewed by Kenneth Russell.
+
+        When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as
+        opposed to only a redraw).
+
+        Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true.
+
+        * platform/graphics/chromium/cc/CCThreadProxy.cpp:
+        (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):
+
 2011-09-27  Kentaro Hara  <haraken@chromium.com>
 
         Implement a PageTransitionEvent constructor for V8
index a1e71da..eb56c28 100644 (file)
@@ -397,7 +397,7 @@ void CCThreadProxy::updateSchedulerStateOnCCThread(bool commitRequested, bool re
     // FIXME: use CCScheduler to decide when to manage the conversion of this
     // commit request into an actual createBeginFrameAndCommitTaskOnCCThread call.
     m_redrawRequestedOnCCThread |= redrawRequested;
-    if (!m_beginFrameAndCommitPendingOnCCThread) {
+    if (commitRequested && !m_beginFrameAndCommitPendingOnCCThread) {
         CCMainThread::postTask(createBeginFrameAndCommitTaskOnCCThread());
         return;
     }