| Index: cc/single_thread_proxy.cc
|
| diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
|
| index 93e397a71997a24e14330a0218224dc4714a8cce..35a9d4072c01a2cdc4f003b5f05820e1fbafb1b0 100644
|
| --- a/cc/single_thread_proxy.cc
|
| +++ b/cc/single_thread_proxy.cc
|
| @@ -29,7 +29,7 @@ CCSingleThreadProxy::CCSingleThreadProxy(CCLayerTreeHost* layerTreeHost)
|
| , m_totalCommitCount(0)
|
| {
|
| TRACE_EVENT0("cc", "CCSingleThreadProxy::CCSingleThreadProxy");
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| }
|
|
|
| void CCSingleThreadProxy::start()
|
| @@ -41,14 +41,14 @@ void CCSingleThreadProxy::start()
|
| CCSingleThreadProxy::~CCSingleThreadProxy()
|
| {
|
| TRACE_EVENT0("cc", "CCSingleThreadProxy::~CCSingleThreadProxy");
|
| - ASSERT(CCProxy::isMainThread());
|
| - ASSERT(!m_layerTreeHostImpl.get() && !m_layerTreeHost); // make sure stop() got called.
|
| + DCHECK(CCProxy::isMainThread());
|
| + DCHECK(!m_layerTreeHostImpl.get() && !m_layerTreeHost); // make sure stop() got called.
|
| }
|
|
|
| bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect)
|
| {
|
| TRACE_EVENT0("cc", "CCSingleThreadProxy::compositeAndReadback");
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
|
|
| if (!commitAndComposite())
|
| return false;
|
| @@ -71,7 +71,7 @@ void CCSingleThreadProxy::startPageScaleAnimation(const IntSize& targetPosition,
|
|
|
| void CCSingleThreadProxy::finishAllRendering()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| {
|
| DebugScopedSetImplThread impl;
|
| m_layerTreeHostImpl->finishAllRendering();
|
| @@ -80,13 +80,13 @@ void CCSingleThreadProxy::finishAllRendering()
|
|
|
| bool CCSingleThreadProxy::isStarted() const
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| return m_layerTreeHostImpl.get();
|
| }
|
|
|
| bool CCSingleThreadProxy::initializeContext()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| scoped_ptr<CCGraphicsContext> context = m_layerTreeHost->createContext();
|
| if (!context.get())
|
| return false;
|
| @@ -107,8 +107,8 @@ void CCSingleThreadProxy::setVisible(bool visible)
|
|
|
| bool CCSingleThreadProxy::initializeRenderer()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| - ASSERT(m_contextBeforeInitialization.get());
|
| + DCHECK(CCProxy::isMainThread());
|
| + DCHECK(m_contextBeforeInitialization.get());
|
| {
|
| DebugScopedSetImplThread impl;
|
| bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitialization.Pass());
|
| @@ -124,8 +124,8 @@ bool CCSingleThreadProxy::initializeRenderer()
|
| bool CCSingleThreadProxy::recreateContext()
|
| {
|
| TRACE_EVENT0("cc", "CCSingleThreadProxy::recreateContext");
|
| - ASSERT(CCProxy::isMainThread());
|
| - ASSERT(m_contextLost);
|
| + DCHECK(CCProxy::isMainThread());
|
| + DCHECK(m_contextLost);
|
|
|
| scoped_ptr<CCGraphicsContext> context = m_layerTreeHost->createContext();
|
| if (!context.get())
|
| @@ -158,14 +158,14 @@ void CCSingleThreadProxy::renderingStats(CCRenderingStats* stats)
|
|
|
| const RendererCapabilities& CCSingleThreadProxy::rendererCapabilities() const
|
| {
|
| - ASSERT(m_rendererInitialized);
|
| + DCHECK(m_rendererInitialized);
|
| // Note: this gets called during the commit by the "impl" thread
|
| return m_RendererCapabilitiesForMainThread;
|
| }
|
|
|
| void CCSingleThreadProxy::loseContext()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| m_layerTreeHost->didLoseContext();
|
| m_contextLost = true;
|
| }
|
| @@ -173,12 +173,12 @@ void CCSingleThreadProxy::loseContext()
|
| void CCSingleThreadProxy::setNeedsAnimate()
|
| {
|
| // CCThread-only feature
|
| - ASSERT_NOT_REACHED();
|
| + NOTREACHED();
|
| }
|
|
|
| void CCSingleThreadProxy::doCommit(scoped_ptr<CCTextureUpdateQueue> queue)
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| // Commit immediately
|
| {
|
| DebugScopedSetMainThreadBlocked mainThreadBlocked;
|
| @@ -203,11 +203,11 @@ void CCSingleThreadProxy::doCommit(scoped_ptr<CCTextureUpdateQueue> queue)
|
|
|
| m_layerTreeHostImpl->commitComplete();
|
|
|
| -#if !ASSERT_DISABLED
|
| +#ifndef NDEBUG
|
| // In the single-threaded case, the scroll deltas should never be
|
| // touched on the impl layer tree.
|
| scoped_ptr<CCScrollAndScaleSet> scrollInfo = m_layerTreeHostImpl->processScrollDeltas();
|
| - ASSERT(!scrollInfo->scrolls.size());
|
| + DCHECK(!scrollInfo->scrolls.size());
|
| #endif
|
|
|
| base::TimeTicks endTime = base::TimeTicks::HighResNow();
|
| @@ -220,7 +220,7 @@ void CCSingleThreadProxy::doCommit(scoped_ptr<CCTextureUpdateQueue> queue)
|
|
|
| void CCSingleThreadProxy::setNeedsCommit()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| m_layerTreeHost->scheduleComposite();
|
| }
|
|
|
| @@ -249,7 +249,7 @@ size_t CCSingleThreadProxy::maxPartialTextureUpdates() const
|
| void CCSingleThreadProxy::stop()
|
| {
|
| TRACE_EVENT0("cc", "CCSingleThreadProxy::stop");
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
| {
|
| DebugScopedSetMainThreadBlocked mainThreadBlocked;
|
| DebugScopedSetImplThread impl;
|
| @@ -273,14 +273,14 @@ void CCSingleThreadProxy::setNeedsCommitOnImplThread()
|
|
|
| void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector> events, double wallClockTime)
|
| {
|
| - ASSERT(CCProxy::isImplThread());
|
| + DCHECK(CCProxy::isImplThread());
|
| DebugScopedSetMainThread main;
|
| m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime);
|
| }
|
|
|
| bool CCSingleThreadProxy::reduceContentsTextureMemoryOnImplThread(size_t limitBytes)
|
| {
|
| - ASSERT(isImplThread());
|
| + DCHECK(isImplThread());
|
| if (!m_layerTreeHost->contentsTextureManager())
|
| return false;
|
|
|
| @@ -307,12 +307,12 @@ void CCSingleThreadProxy::forceSerializeOnSwapBuffers()
|
|
|
| void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread()
|
| {
|
| - ASSERT_NOT_REACHED();
|
| + NOTREACHED();
|
| }
|
|
|
| bool CCSingleThreadProxy::commitAndComposite()
|
| {
|
| - ASSERT(CCProxy::isMainThread());
|
| + DCHECK(CCProxy::isMainThread());
|
|
|
| if (!m_layerTreeHost->initializeRendererIfNeeded())
|
| return false;
|
| @@ -340,7 +340,7 @@ bool CCSingleThreadProxy::commitAndComposite()
|
|
|
| bool CCSingleThreadProxy::doComposite()
|
| {
|
| - ASSERT(!m_contextLost);
|
| + DCHECK(!m_contextLost);
|
| {
|
| DebugScopedSetImplThread impl;
|
|
|
|
|