Index: cc/CCLayerTreeHost.cpp |
diff --git a/cc/CCLayerTreeHost.cpp b/cc/CCLayerTreeHost.cpp |
index d75a3d36b784a3d7ed2036180797409ff2073b01..f618b01868b98c240cc80fd18cc28550605d6cf1 100644 |
--- a/cc/CCLayerTreeHost.cpp |
+++ b/cc/CCLayerTreeHost.cpp |
@@ -111,7 +111,7 @@ CCLayerTreeHost::CCLayerTreeHost(CCLayerTreeHostClient* client, const CCLayerTre |
, m_hasTransparentBackground(false) |
, m_partialTextureUpdateRequests(0) |
{ |
- ASSERT(CCProxy::isMainThread()); |
+ DCHECK(CCProxy::isMainThread()); |
numLayerTreeInstances++; |
} |
@@ -132,9 +132,9 @@ CCLayerTreeHost::~CCLayerTreeHost() |
{ |
if (m_rootLayer) |
m_rootLayer->setLayerTreeHost(0); |
- ASSERT(CCProxy::isMainThread()); |
+ DCHECK(CCProxy::isMainThread()); |
TRACE_EVENT0("cc", "CCLayerTreeHost::~CCLayerTreeHost"); |
- ASSERT(m_proxy.get()); |
+ DCHECK(m_proxy.get()); |
m_proxy->stop(); |
m_proxy.reset(); |
numLayerTreeInstances--; |
@@ -177,7 +177,7 @@ void CCLayerTreeHost::initializeRenderer() |
CCLayerTreeHost::RecreateResult CCLayerTreeHost::recreateContext() |
{ |
TRACE_EVENT0("cc", "CCLayerTreeHost::recreateContext"); |
- ASSERT(m_contextLost); |
+ DCHECK(m_contextLost); |
bool recreated = false; |
if (!m_numTimesRecreateShouldFail) |
@@ -211,14 +211,14 @@ CCLayerTreeHost::RecreateResult CCLayerTreeHost::recreateContext() |
void CCLayerTreeHost::deleteContentsTexturesOnImplThread(CCResourceProvider* resourceProvider) |
{ |
- ASSERT(CCProxy::isImplThread()); |
+ DCHECK(CCProxy::isImplThread()); |
if (m_rendererInitialized) |
m_contentsTextureManager->clearAllMemory(resourceProvider); |
} |
void CCLayerTreeHost::acquireLayerTextures() |
{ |
- ASSERT(CCProxy::isMainThread()); |
+ DCHECK(CCProxy::isMainThread()); |
m_proxy->acquireLayerTextures(); |
} |
@@ -239,7 +239,7 @@ void CCLayerTreeHost::layout() |
void CCLayerTreeHost::beginCommitOnImplThread(CCLayerTreeHostImpl* hostImpl) |
{ |
- ASSERT(CCProxy::isImplThread()); |
+ DCHECK(CCProxy::isImplThread()); |
TRACE_EVENT0("cc", "CCLayerTreeHost::commitTo"); |
m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider()); |
@@ -252,7 +252,7 @@ void CCLayerTreeHost::beginCommitOnImplThread(CCLayerTreeHostImpl* hostImpl) |
// after the commit, but on the main thread. |
void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl) |
{ |
- ASSERT(CCProxy::isImplThread()); |
+ DCHECK(CCProxy::isImplThread()); |
hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostImpl->detachLayerTree(), hostImpl)); |
@@ -321,7 +321,7 @@ scoped_ptr<CCLayerTreeHostImpl> CCLayerTreeHost::createLayerTreeHostImpl(CCLayer |
void CCLayerTreeHost::didLoseContext() |
{ |
TRACE_EVENT0("cc", "CCLayerTreeHost::didLoseContext"); |
- ASSERT(CCProxy::isMainThread()); |
+ DCHECK(CCProxy::isMainThread()); |
m_contextLost = true; |
m_numFailedRecreateAttempts = 0; |
setNeedsCommit(); |
@@ -355,7 +355,7 @@ const RendererCapabilities& CCLayerTreeHost::rendererCapabilities() const |
void CCLayerTreeHost::setNeedsAnimate() |
{ |
- ASSERT(CCProxy::hasImplThread()); |
+ DCHECK(CCProxy::hasImplThread()); |
m_proxy->setNeedsAnimate(); |
} |
@@ -378,7 +378,7 @@ bool CCLayerTreeHost::commitRequested() const |
void CCLayerTreeHost::setAnimationEvents(scoped_ptr<CCAnimationEventsVector> events, double wallClockTime) |
{ |
- ASSERT(CCThreadProxy::isMainThread()); |
+ DCHECK(CCThreadProxy::isMainThread()); |
setAnimationEventsRecursive(*events.get(), m_rootLayer.get(), wallClockTime); |
} |
@@ -437,21 +437,21 @@ void CCLayerTreeHost::setVisible(bool visible) |
void CCLayerTreeHost::reduceContentsTexturesMemoryOnImplThread(size_t limitBytes, CCResourceProvider* resourceProvider) |
{ |
- ASSERT(CCProxy::isImplThread()); |
- ASSERT(m_contentsTextureManager.get()); |
+ DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_contentsTextureManager.get()); |
m_contentsTextureManager->reduceMemoryOnImplThread(limitBytes, resourceProvider); |
} |
bool CCLayerTreeHost::evictedContentsTexturesBackingsExist() const |
{ |
- ASSERT(CCProxy::isImplThread()); |
- ASSERT(m_contentsTextureManager.get()); |
+ DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_contentsTextureManager.get()); |
return m_contentsTextureManager->evictedBackingsExist(); |
} |
void CCLayerTreeHost::getEvictedContentTexturesBackings(CCPrioritizedTextureManager::BackingVector& evictedBackings) |
{ |
- ASSERT(CCProxy::isImplThread()); |
+ DCHECK(CCProxy::isImplThread()); |
evictedBackings.clear(); |
if (m_rendererInitialized) |
m_contentsTextureManager->getEvictedBackings(evictedBackings); |
@@ -459,15 +459,15 @@ void CCLayerTreeHost::getEvictedContentTexturesBackings(CCPrioritizedTextureMana |
void CCLayerTreeHost::unlinkEvictedContentTexturesBackings(const CCPrioritizedTextureManager::BackingVector& evictedBackings) |
{ |
- ASSERT(CCProxy::isMainThread()); |
- ASSERT(m_contentsTextureManager.get()); |
+ DCHECK(CCProxy::isMainThread()); |
+ DCHECK(m_contentsTextureManager.get()); |
m_contentsTextureManager->unlinkEvictedBackings(evictedBackings); |
} |
bool CCLayerTreeHost::deleteEvictedContentTexturesBackings() |
{ |
- ASSERT(CCProxy::isImplThread() && CCProxy::isMainThreadBlocked()); |
- ASSERT(m_contentsTextureManager.get()); |
+ DCHECK(CCProxy::isImplThread() && CCProxy::isMainThreadBlocked()); |
+ DCHECK(m_contentsTextureManager.get()); |
return m_contentsTextureManager->deleteEvictedBackings(); |
} |
@@ -490,7 +490,7 @@ CCPrioritizedTextureManager* CCLayerTreeHost::contentsTextureManager() const |
void CCLayerTreeHost::composite() |
{ |
- ASSERT(!CCThreadProxy::implThread()); |
+ DCHECK(!CCThreadProxy::implThread()); |
static_cast<CCSingleThreadProxy*>(m_proxy.get())->compositeImmediately(); |
} |
@@ -516,8 +516,8 @@ bool CCLayerTreeHost::initializeRendererIfNeeded() |
void CCLayerTreeHost::updateLayers(CCTextureUpdateQueue& queue, size_t memoryAllocationLimitBytes) |
{ |
- ASSERT(m_rendererInitialized); |
- ASSERT(memoryAllocationLimitBytes); |
+ DCHECK(m_rendererInitialized); |
+ DCHECK(memoryAllocationLimitBytes); |
if (!rootLayer()) |
return; |
@@ -708,10 +708,10 @@ bool CCLayerTreeHost::paintLayerContents(const LayerList& renderSurfaceLayerList |
occlusionTracker.enterLayer(it); |
if (it.representsTargetRenderSurface()) { |
- ASSERT(it->renderSurface()->drawOpacity() || it->renderSurface()->drawOpacityIsAnimating()); |
+ DCHECK(it->renderSurface()->drawOpacity() || it->renderSurface()->drawOpacityIsAnimating()); |
needMoreUpdates |= paintMasksForRenderSurface(*it, queue); |
} else if (it.representsItself()) { |
- ASSERT(!it->bounds().isEmpty()); |
+ DCHECK(!it->bounds().isEmpty()); |
it->update(queue, &occlusionTracker, m_renderingStats); |
needMoreUpdates |= it->needMoreUpdates(); |
} |
@@ -755,7 +755,7 @@ void CCLayerTreeHost::startRateLimiter(WebKit::WebGraphicsContext3D* context) |
if (m_animating) |
return; |
- ASSERT(context); |
+ DCHECK(context); |
RateLimiterMap::iterator it = m_rateLimiters.find(context); |
if (it != m_rateLimiters.end()) |
it->second->start(); |