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

Unified Diff: cc/single_thread_proxy.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/single_thread_proxy.h ('k') | cc/software_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/single_thread_proxy.cc
===================================================================
--- cc/single_thread_proxy.cc (revision 165906)
+++ cc/single_thread_proxy.cc (working copy)
@@ -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 @@
}
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 @@
void SingleThreadProxy::start()
{
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThread impl;
m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl(this);
}
@@ -73,7 +71,7 @@
{
DCHECK(Proxy::isMainThread());
{
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThread impl;
m_layerTreeHostImpl->finishAllRendering();
}
}
@@ -101,7 +99,7 @@
void SingleThreadProxy::setVisible(bool visible)
{
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThread impl;
m_layerTreeHostImpl->setVisible(visible);
}
@@ -110,7 +108,7 @@
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 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 @@
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 @@
NULL,
Proxy::mainThread(),
queue.Pass(),
- m_layerTreeHostImpl->resourceProvider(),
- hasImplThread());
+ m_layerTreeHostImpl->resourceProvider());
updateController->finalize();
m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get());
@@ -257,8 +254,8 @@
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::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::forceSerializeOnSwapBuffers()
{
{
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThread impl;
if (m_rendererInitialized)
m_layerTreeHostImpl->renderer()->doNoOp();
}
@@ -342,7 +339,7 @@
// 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 @@
{
DCHECK(!m_contextLost);
{
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThread impl;
if (!m_layerTreeHostImpl->visible())
return false;
« no previous file with comments | « cc/single_thread_proxy.h ('k') | cc/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698