Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3924)

Unified Diff: cc/CCThreadProxy.cpp

Issue 10911262: cc: Scheduler will never process a commit until it receives a vsync tick. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCThreadProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCThreadProxy.cpp
diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp
index e5802f7b83d11dd48e759af8d3394afdc908a27b..009ac1cd17dbcc1ac1748eb8fe1287da4c0bc232 100644
--- a/cc/CCThreadProxy.cpp
+++ b/cc/CCThreadProxy.cpp
@@ -14,7 +14,6 @@
#include "CCLayerTreeHost.h"
#include "CCScheduler.h"
#include "CCScopedThreadProxy.h"
-#include "CCTextureUpdateController.h"
#include "CCThreadTask.h"
#include "TraceEvent.h"
#include <public/WebSharedGraphicsContext3D.h>
@@ -594,10 +593,12 @@ void CCThreadProxy::beginFrameCompleteOnImplThread(CCCompletionEvent* completion
setNeedsCommitOnImplThread();
}
- m_currentTextureUpdateControllerOnImplThread = CCTextureUpdateController::create(CCProxy::implThread(), queue, m_layerTreeHostImpl->resourceProvider(), m_layerTreeHostImpl->renderer()->textureCopier(), m_layerTreeHostImpl->renderer()->textureUploader());
+ bool hasResourceUpdates = queue->hasMoreUpdates();
+ if (hasResourceUpdates)
+ m_currentTextureUpdateControllerOnImplThread = CCTextureUpdateController::create(this, CCProxy::implThread(), queue, m_layerTreeHostImpl->resourceProvider(), m_layerTreeHostImpl->renderer()->textureCopier(), m_layerTreeHostImpl->renderer()->textureUploader());
m_commitCompletionEventOnImplThread = completion;
- m_schedulerOnImplThread->beginFrameComplete();
+ m_schedulerOnImplThread->beginFrameComplete(hasResourceUpdates);
}
void CCThreadProxy::beginFrameAbortedOnImplThread()
@@ -610,13 +611,6 @@ void CCThreadProxy::beginFrameAbortedOnImplThread()
m_schedulerOnImplThread->beginFrameAborted();
}
-bool CCThreadProxy::hasMoreResourceUpdates() const
-{
- if (!m_currentTextureUpdateControllerOnImplThread)
- return false;
- return m_currentTextureUpdateControllerOnImplThread->hasMoreUpdates();
-}
-
void CCThreadProxy::scheduledActionUpdateMoreResources(double monotonicTimeLimit)
{
TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionUpdateMoreResources");
@@ -628,7 +622,6 @@ void CCThreadProxy::scheduledActionCommit()
{
TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionCommit");
ASSERT(isImplThread());
- ASSERT(!hasMoreResourceUpdates());
ASSERT(m_commitCompletionEventOnImplThread);
m_currentTextureUpdateControllerOnImplThread.clear();
@@ -768,6 +761,12 @@ CCScheduledActionDrawAndSwapResult CCThreadProxy::scheduledActionDrawAndSwapForc
return scheduledActionDrawAndSwapInternal(true);
}
+void CCThreadProxy::updateTexturesCompleted()
+{
+ ASSERT(isImplThread());
+ m_schedulerOnImplThread->updateResourcesComplete();
+}
+
void CCThreadProxy::didCommitAndDrawFrame()
{
ASSERT(isMainThread());
« no previous file with comments | « cc/CCThreadProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698