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()); |