Chromium Code Reviews| Index: cc/layer_impl.cc |
| diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc |
| index 2b30363982259ae76ccf6d6ebc8ec18d13980b1f..9cd21aa1d4663c6b11f218f8e48ff34c2e38ebed 100644 |
| --- a/cc/layer_impl.cc |
| +++ b/cc/layer_impl.cc |
| @@ -15,6 +15,7 @@ |
| #include "CCScrollbarAnimationController.h" |
| #include "CCSettings.h" |
| #include "TraceEvent.h" |
| +#include "cc/dcheck.h" |
| using WebKit::WebTransformationMatrix; |
| @@ -54,21 +55,19 @@ CCLayerImpl::CCLayerImpl(int id) |
| , m_debugBorderWidth(0) |
| , m_drawTransformIsAnimating(false) |
| , m_screenSpaceTransformIsAnimating(false) |
| -#ifndef NDEBUG |
| +#if CC_DCHECK_ENABLED() |
|
slavi
2012/10/16 20:31:46
Keep this as #ifndef NDEBUG?
|
| , m_betweenWillDrawAndDidDraw(false) |
| #endif |
| , m_layerAnimationController(CCLayerAnimationController::create(this)) |
| { |
| - ASSERT(CCProxy::isImplThread()); |
| - ASSERT(m_layerId > 0); |
| + DCHECK(CCProxy::isImplThread()); |
| + DCHECK(m_layerId > 0); |
| } |
| CCLayerImpl::~CCLayerImpl() |
| { |
| - ASSERT(CCProxy::isImplThread()); |
| -#ifndef NDEBUG |
|
slavi
2012/10/16 20:31:46
Keep this #ifndef NDEBUG?
|
| - ASSERT(!m_betweenWillDrawAndDidDraw); |
| -#endif |
| + DCHECK(CCProxy::isImplThread()); |
| + DCHECK(!m_betweenWillDrawAndDidDraw); |
| } |
| void CCLayerImpl::addChild(scoped_ptr<CCLayerImpl> child) |
| @@ -106,7 +105,7 @@ void CCLayerImpl::clearChildList() |
| void CCLayerImpl::createRenderSurface() |
| { |
| - ASSERT(!m_renderSurface); |
| + DCHECK(!m_renderSurface); |
| m_renderSurface = make_scoped_ptr(new CCRenderSurface(this)); |
| setRenderTarget(this); |
| } |
| @@ -127,17 +126,17 @@ scoped_ptr<CCSharedQuadState> CCLayerImpl::createSharedQuadState() const |
| void CCLayerImpl::willDraw(CCResourceProvider*) |
| { |
| -#ifndef NDEBUG |
| +#if CC_DCHECK_ENABLED() |
|
slavi
2012/10/16 20:31:46
Keep this as #ifndef NDEBUG?
|
| // willDraw/didDraw must be matched. |
| - ASSERT(!m_betweenWillDrawAndDidDraw); |
| + DCHECK(!m_betweenWillDrawAndDidDraw); |
| m_betweenWillDrawAndDidDraw = true; |
| #endif |
| } |
| void CCLayerImpl::didDraw(CCResourceProvider*) |
| { |
| -#ifndef NDEBUG |
| - ASSERT(m_betweenWillDrawAndDidDraw); |
| +#if CC_DCHECK_ENABLED() |
|
slavi
2012/10/16 20:31:46
Keep this as #ifndef NDEBUG?
|
| + DCHECK(m_betweenWillDrawAndDidDraw); |
| m_betweenWillDrawAndDidDraw = false; |
| #endif |
| } |
| @@ -168,7 +167,7 @@ CCRenderPass::Id CCLayerImpl::nextContributingRenderPassId(CCRenderPass::Id) con |
| CCResourceProvider::ResourceId CCLayerImpl::contentsResourceId() const |
| { |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return 0; |
| } |