Index: cc/layer_tree_host_impl.cc |
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc |
index d762b0c32a093fc3b0864b5d011c4e0cc603749b..c52b6fb14842249867fcfa3c0aac9e2635612caa 100644 |
--- a/cc/layer_tree_host_impl.cc |
+++ b/cc/layer_tree_host_impl.cc |
@@ -213,6 +213,7 @@ scoped_ptr<CCLayerTreeHostImpl> CCLayerTreeHostImpl::create(const CCLayerTreeSet |
CCLayerTreeHostImpl::CCLayerTreeHostImpl(const CCLayerTreeSettings& settings, CCLayerTreeHostImplClient* client) |
: m_client(client) |
+ , m_proxy(reinterpret_cast<CCProxy*>(client)) |
, m_sourceFrameNumber(-1) |
, m_rootScrollLayerImpl(0) |
, m_currentlyScrollingLayerImpl(0) |
@@ -228,18 +229,18 @@ CCLayerTreeHostImpl::CCLayerTreeHostImpl(const CCLayerTreeSettings& settings, CC |
, m_hasTransparentBackground(false) |
, m_needsAnimateLayers(false) |
, m_pinchGestureActive(false) |
- , m_fpsCounter(CCFrameRateCounter::create()) |
+ , m_fpsCounter(CCFrameRateCounter::create(m_proxy->hasImplThread())) |
, m_debugRectHistory(CCDebugRectHistory::create()) |
, m_numImplThreadScrolls(0) |
, m_numMainThreadScrolls(0) |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
didVisibilityChange(this, m_visible); |
} |
CCLayerTreeHostImpl::~CCLayerTreeHostImpl() |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
TRACE_EVENT0("cc", "CCLayerTreeHostImpl::~CCLayerTreeHostImpl()"); |
if (m_rootLayerImpl) |
@@ -502,7 +503,7 @@ void CCLayerTreeHostImpl::setBackgroundTickingEnabled(bool enabled) |
{ |
// Lazily create the timeSource adapter so that we can vary the interval for testing. |
if (!m_timeSourceClientAdapter) |
- m_timeSourceClientAdapter = CCLayerTreeHostImplTimeSourceAdapter::create(this, CCDelayBasedTimeSource::create(lowFrequencyAnimationInterval(), CCProxy::currentThread())); |
+ m_timeSourceClientAdapter = CCLayerTreeHostImplTimeSourceAdapter::create(this, CCDelayBasedTimeSource::create(lowFrequencyAnimationInterval(), m_proxy->currentThread())); |
m_timeSourceClientAdapter->setActive(enabled); |
} |
@@ -811,7 +812,7 @@ scoped_ptr<CCLayerImpl> CCLayerTreeHostImpl::detachLayerTree() |
void CCLayerTreeHostImpl::setVisible(bool visible) |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
if (m_visible == visible) |
return; |
@@ -844,7 +845,7 @@ bool CCLayerTreeHostImpl::initializeRenderer(scoped_ptr<CCGraphicsContext> conte |
if (!context->bindToClient(this)) |
return false; |
- scoped_ptr<CCResourceProvider> resourceProvider = CCResourceProvider::create(context.get()); |
+ scoped_ptr<CCResourceProvider> resourceProvider = CCResourceProvider::create(context.get(), m_proxy); |
if (!resourceProvider) |
return false; |