summaryrefslogtreecommitdiffstats
path: root/cc/CCThreadProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cc/CCThreadProxy.cpp')
-rw-r--r--cc/CCThreadProxy.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp
index e5802f7b..009ac1c 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());