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

Unified Diff: cc/CCThreadProxy.cpp

Issue 10917153: Update cc snapshot to r127918 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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') | cc/CCThreadedTest.cpp » ('j') | 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 184ec514826c436fc68e00edce7c78451a2382ca..1bbe5bc929e3103f7af9cb84ceef9fcdeb207060 100644
--- a/cc/CCThreadProxy.cpp
+++ b/cc/CCThreadProxy.cpp
@@ -51,7 +51,6 @@ CCThreadProxy::CCThreadProxy(CCLayerTreeHost* layerTreeHost)
, m_commitRequestSentToImplThread(false)
, m_forcedCommitRequested(false)
, m_layerTreeHost(layerTreeHost)
- , m_compositorIdentifier(-1)
, m_rendererInitialized(false)
, m_started(false)
, m_texturesAcquired(true)
@@ -251,12 +250,6 @@ bool CCThreadProxy::recreateContext()
return recreateSucceeded;
}
-int CCThreadProxy::compositorIdentifier() const
-{
- ASSERT(isMainThread());
- return m_compositorIdentifier;
-}
-
void CCThreadProxy::implSideRenderingStats(CCRenderingStats& stats)
{
ASSERT(isMainThread());
@@ -389,7 +382,8 @@ void CCThreadProxy::start()
// Create LayerTreeHostImpl.
DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
- CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::initializeImplOnImplThread, &completion));
+ OwnPtr<CCInputHandler> handler = m_layerTreeHost->createInputHandler();
+ CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::initializeImplOnImplThread, &completion, handler.release()));
completion.wait();
m_started = true;
@@ -682,7 +676,8 @@ CCScheduledActionDrawAndSwapResult CCThreadProxy::scheduledActionDrawAndSwapInte
double monotonicTime = monotonicallyIncreasingTime();
double wallClockTime = currentTime();
- m_inputHandlerOnImplThread->animate(monotonicTime);
+ if (m_inputHandlerOnImplThread)
+ m_inputHandlerOnImplThread->animate(monotonicTime);
m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
// This method is called on a forced draw, regardless of whether we are able to produce a frame,
@@ -835,7 +830,7 @@ void CCThreadProxy::tryToRecreateContext()
m_contextRecreationTimer.clear();
}
-void CCThreadProxy::initializeImplOnImplThread(CCCompletionEvent* completion)
+void CCThreadProxy::initializeImplOnImplThread(CCCompletionEvent* completion, PassOwnPtr<CCInputHandler> popHandler)
{
TRACE_EVENT0("cc", "CCThreadProxy::initializeImplOnImplThread");
ASSERT(isImplThread());
@@ -849,8 +844,9 @@ void CCThreadProxy::initializeImplOnImplThread(CCCompletionEvent* completion)
m_schedulerOnImplThread = CCScheduler::create(this, frameRateController.release());
m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible());
- m_inputHandlerOnImplThread = CCInputHandler::create(m_layerTreeHostImpl.get());
- m_compositorIdentifier = m_inputHandlerOnImplThread->identifier();
+ m_inputHandlerOnImplThread = popHandler;
+ if (m_inputHandlerOnImplThread)
+ m_inputHandlerOnImplThread->bindToClient(m_layerTreeHostImpl.get());
completion->signal();
}
« no previous file with comments | « cc/CCThreadProxy.h ('k') | cc/CCThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698