diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 21:21:59 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 21:21:59 +0000 |
commit | 5bc29a2dabe01f1e2315bcc287f11db10df4144b (patch) | |
tree | 0c451bebe2c40e867a935b5f52b25a242f5f825c /cc/single_thread_proxy.cc | |
parent | 4d8bb1a91681f8e48cc5e6b7ac29f3723eadf0d5 (diff) | |
download | chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.zip chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.tar.gz chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.tar.bz2 |
Revert 165476 - Remove static thread pointers from CC
Might be causing webkit_unit_tests to fail on mac/win
BUG=152904
Review URL: https://codereview.chromium.org/11232051
TBR=jamesr@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/single_thread_proxy.cc')
-rw-r--r-- | cc/single_thread_proxy.cc | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc index dfc86fb..7fe679f 100644 --- a/cc/single_thread_proxy.cc +++ b/cc/single_thread_proxy.cc @@ -11,7 +11,6 @@ #include "cc/graphics_context.h" #include "cc/layer_tree_host.h" #include "cc/resource_update_controller.h" -#include "cc/thread.h" namespace cc { @@ -21,8 +20,7 @@ scoped_ptr<Proxy> SingleThreadProxy::create(LayerTreeHost* layerTreeHost) } SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layerTreeHost) - : Proxy(scoped_ptr<Thread>(NULL)) - , m_layerTreeHost(layerTreeHost) + : m_layerTreeHost(layerTreeHost) , m_contextLost(false) , m_rendererInitialized(false) , m_nextFrameIsNewlyCommittedFrame(false) @@ -34,7 +32,7 @@ SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layerTreeHost) void SingleThreadProxy::start() { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl(this); } @@ -73,7 +71,7 @@ void SingleThreadProxy::finishAllRendering() { DCHECK(Proxy::isMainThread()); { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; m_layerTreeHostImpl->finishAllRendering(); } } @@ -101,7 +99,7 @@ void SingleThreadProxy::setSurfaceReady() void SingleThreadProxy::setVisible(bool visible) { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; m_layerTreeHostImpl->setVisible(visible); } @@ -110,7 +108,7 @@ bool SingleThreadProxy::initializeRenderer() DCHECK(Proxy::isMainThread()); DCHECK(m_contextBeforeInitialization.get()); { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitialization.Pass()); if (ok) { m_rendererInitialized = true; @@ -133,8 +131,8 @@ bool SingleThreadProxy::recreateContext() bool initialized; { - DebugScopedSetMainThreadBlocked mainThreadBlocked(this); - DebugScopedSetImplThread impl(this); + DebugScopedSetMainThreadBlocked mainThreadBlocked; + DebugScopedSetImplThread impl; if (!m_layerTreeHostImpl->contentsTexturesPurged()) m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider()); initialized = m_layerTreeHostImpl->initializeRenderer(context.Pass()); @@ -181,8 +179,8 @@ void SingleThreadProxy::doCommit(scoped_ptr<ResourceUpdateQueue> queue) DCHECK(Proxy::isMainThread()); // Commit immediately { - DebugScopedSetMainThreadBlocked mainThreadBlocked(this); - DebugScopedSetImplThread impl(this); + DebugScopedSetMainThreadBlocked mainThreadBlocked; + DebugScopedSetImplThread impl; base::TimeTicks startTime = base::TimeTicks::HighResNow(); m_layerTreeHostImpl->beginCommit(); @@ -195,8 +193,7 @@ void SingleThreadProxy::doCommit(scoped_ptr<ResourceUpdateQueue> queue) NULL, Proxy::mainThread(), queue.Pass(), - m_layerTreeHostImpl->resourceProvider(), - hasImplThread()); + m_layerTreeHostImpl->resourceProvider()); updateController->finalize(); m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get()); @@ -257,8 +254,8 @@ void SingleThreadProxy::stop() TRACE_EVENT0("cc", "SingleThreadProxy::stop"); DCHECK(Proxy::isMainThread()); { - DebugScopedSetMainThreadBlocked mainThreadBlocked(this); - DebugScopedSetImplThread impl(this); + DebugScopedSetMainThreadBlocked mainThreadBlocked; + DebugScopedSetImplThread impl; if (!m_layerTreeHostImpl->contentsTexturesPurged()) m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider()); @@ -280,7 +277,7 @@ void SingleThreadProxy::setNeedsCommitOnImplThread() void SingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr<AnimationEventsVector> events, base::Time wallClockTime) { DCHECK(Proxy::isImplThread()); - DebugScopedSetMainThread main(this); + DebugScopedSetMainThread main; m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime); } @@ -321,7 +318,7 @@ void SingleThreadProxy::compositeImmediately() void SingleThreadProxy::forceSerializeOnSwapBuffers() { { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; if (m_rendererInitialized) m_layerTreeHostImpl->renderer()->doNoOp(); } @@ -342,7 +339,7 @@ bool SingleThreadProxy::commitAndComposite() // Unlink any texture backings that were deleted PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread implThread; m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedContentsTexturesBackings); } m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedContentsTexturesBackings); @@ -364,7 +361,7 @@ bool SingleThreadProxy::doComposite() { DCHECK(!m_contextLost); { - DebugScopedSetImplThread impl(this); + DebugScopedSetImplThread impl; if (!m_layerTreeHostImpl->visible()) return false; |