Index: cc/CCThreadProxy.cpp |
diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp |
index 92550104579d2fc8e98e07cee4078f558aeb8fe9..184ec514826c436fc68e00edce7c78451a2382ca 100644 |
--- a/cc/CCThreadProxy.cpp |
+++ b/cc/CCThreadProxy.cpp |
@@ -332,6 +332,13 @@ void CCThreadProxy::onVSyncParametersChanged(double monotonicTimebase, double in |
m_schedulerOnImplThread->setTimebaseAndInterval(monotonicTimebase, intervalInSeconds); |
} |
+void CCThreadProxy::onCanDrawStateChanged(bool canDraw) |
+{ |
+ ASSERT(isImplThread()); |
+ TRACE_EVENT1("cc", "CCThreadProxy::onCanDrawStateChanged", "canDraw", canDraw); |
+ m_schedulerOnImplThread->setCanDraw(canDraw); |
+} |
+ |
void CCThreadProxy::setNeedsCommitOnImplThread() |
{ |
ASSERT(isImplThread()); |
@@ -522,8 +529,10 @@ void CCThreadProxy::beginFrame() |
m_commitRequestSentToImplThread = false; |
m_forcedCommitRequested = false; |
- if (!m_layerTreeHost->initializeRendererIfNeeded()) |
+ if (!m_layerTreeHost->initializeRendererIfNeeded()) { |
+ TRACE_EVENT0("cc", "EarlyOut_InitializeFailed"); |
return; |
+ } |
if (request->contentsTexturesWereDeleted) |
m_layerTreeHost->evictAllContentTextures(); |
@@ -573,6 +582,7 @@ void CCThreadProxy::beginFrameCompleteOnImplThread(CCCompletionEvent* completion |
ASSERT(m_schedulerOnImplThread->commitPending()); |
if (!m_layerTreeHostImpl) { |
+ TRACE_EVENT0("cc", "EarlyOut_NoLayerTree"); |
completion->signal(); |
return; |
} |
@@ -610,14 +620,6 @@ bool CCThreadProxy::hasMoreResourceUpdates() const |
return m_currentTextureUpdateControllerOnImplThread->hasMoreUpdates(); |
} |
-bool CCThreadProxy::canDraw() |
-{ |
- ASSERT(isImplThread()); |
- if (!m_layerTreeHostImpl) |
- return false; |
- return m_layerTreeHostImpl->canDraw(); |
-} |
- |
void CCThreadProxy::scheduledActionUpdateMoreResources(double monotonicTimeLimit) |
{ |
TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionUpdateMoreResources"); |
@@ -868,8 +870,8 @@ void CCThreadProxy::initializeRendererOnImplThread(CCCompletionEvent* completion |
*initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitializationOnImplThread.release(), textureUploader); |
if (*initializeSucceeded) { |
*capabilities = m_layerTreeHostImpl->rendererCapabilities(); |
- if (capabilities->usingSwapCompleteCallback) |
- m_schedulerOnImplThread->setMaxFramesPending(2); |
+ m_schedulerOnImplThread->setSwapBuffersCompleteSupported( |
+ capabilities->usingSwapCompleteCallback); |
} |
completion->signal(); |