| Index: cc/CCVideoLayerImpl.cpp
|
| diff --git a/cc/CCVideoLayerImpl.cpp b/cc/CCVideoLayerImpl.cpp
|
| index d1fb41277cb5a4927b0c83acf0b137467aa0b845..89e67b9a58dd44977f613fedab2c2e198ef06c85 100644
|
| --- a/cc/CCVideoLayerImpl.cpp
|
| +++ b/cc/CCVideoLayerImpl.cpp
|
| @@ -40,25 +40,25 @@ CCVideoLayerImpl::CCVideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provid
|
| // thread is blocked. That makes this a thread-safe call to set the video
|
| // frame provider client that does not require a lock. The same is true of
|
| // the call in the destructor.
|
| - ASSERT(CCProxy::isMainThreadBlocked());
|
| + DCHECK(CCProxy::isMainThreadBlocked());
|
| m_provider->setVideoFrameProviderClient(this);
|
| }
|
|
|
| CCVideoLayerImpl::~CCVideoLayerImpl()
|
| {
|
| // See comment in constructor for why this doesn't need a lock.
|
| - ASSERT(CCProxy::isMainThreadBlocked());
|
| + DCHECK(CCProxy::isMainThreadBlocked());
|
| if (m_provider) {
|
| m_provider->setVideoFrameProviderClient(0);
|
| m_provider = 0;
|
| }
|
| freePlaneData(layerTreeHostImpl()->resourceProvider());
|
|
|
| -#if !ASSERT_DISABLED
|
| - for (unsigned i = 0; i < WebKit::WebVideoFrame::maxPlanes; ++i)
|
| - ASSERT(!m_framePlanes[i].resourceId);
|
| - ASSERT(!m_externalTextureResource);
|
| -#endif
|
| + if (DCHECK_IS_ON()) {
|
| + for (unsigned i = 0; i < WebKit::WebVideoFrame::maxPlanes; ++i)
|
| + DCHECK(!m_framePlanes[i].resourceId);
|
| + DCHECK(!m_externalTextureResource);
|
| + }
|
| }
|
|
|
| void CCVideoLayerImpl::stopUsingProvider()
|
| @@ -66,7 +66,7 @@ void CCVideoLayerImpl::stopUsingProvider()
|
| // Block the provider from shutting down until this client is done
|
| // using the frame.
|
| MutexLocker locker(m_providerMutex);
|
| - ASSERT(!m_frame);
|
| + DCHECK(!m_frame);
|
| m_provider = 0;
|
| }
|
|
|
| @@ -90,7 +90,7 @@ static GC3Denum convertVFCFormatToGC3DFormat(const WebKit::WebVideoFrame& frame)
|
|
|
| void CCVideoLayerImpl::willDraw(CCResourceProvider* resourceProvider)
|
| {
|
| - ASSERT(CCProxy::isImplThread());
|
| + DCHECK(CCProxy::isImplThread());
|
| CCLayerImpl::willDraw(resourceProvider);
|
|
|
| // Explicitly lock and unlock the provider mutex so it can be held from
|
| @@ -111,8 +111,8 @@ void CCVideoLayerImpl::willDraw(CCResourceProvider* resourceProvider)
|
|
|
| void CCVideoLayerImpl::willDrawInternal(CCResourceProvider* resourceProvider)
|
| {
|
| - ASSERT(CCProxy::isImplThread());
|
| - ASSERT(!m_externalTextureResource);
|
| + DCHECK(CCProxy::isImplThread());
|
| + DCHECK(!m_externalTextureResource);
|
|
|
| if (!m_provider) {
|
| m_frame = 0;
|
| @@ -156,7 +156,7 @@ void CCVideoLayerImpl::willDrawInternal(CCResourceProvider* resourceProvider)
|
|
|
| void CCVideoLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsData& appendQuadsData)
|
| {
|
| - ASSERT(CCProxy::isImplThread());
|
| + DCHECK(CCProxy::isImplThread());
|
|
|
| if (!m_frame)
|
| return;
|
| @@ -219,18 +219,18 @@ void CCVideoLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsData& appe
|
|
|
| void CCVideoLayerImpl::didDraw(CCResourceProvider* resourceProvider)
|
| {
|
| - ASSERT(CCProxy::isImplThread());
|
| + DCHECK(CCProxy::isImplThread());
|
| CCLayerImpl::didDraw(resourceProvider);
|
|
|
| if (!m_frame)
|
| return;
|
|
|
| if (m_format == GraphicsContext3D::TEXTURE_2D) {
|
| - ASSERT(m_externalTextureResource);
|
| + DCHECK(m_externalTextureResource);
|
| // FIXME: the following assert will not be true when sending resources to a
|
| // parent compositor. We will probably need to hold on to m_frame for
|
| // longer, and have several "current frames" in the pipeline.
|
| - ASSERT(!resourceProvider->inUseByConsumer(m_externalTextureResource));
|
| + DCHECK(!resourceProvider->inUseByConsumer(m_externalTextureResource));
|
| resourceProvider->deleteResource(m_externalTextureResource);
|
| m_externalTextureResource = 0;
|
| }
|
|
|