Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2048)

Unified Diff: cc/thread_proxy.cc

Issue 11606012: cc: Unify context losing machinery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reboot Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index d3aac84f1d7b01ea1446ccf4ae73a9898f8d0533..921b15a1f1f8191a5da930a89ec213ff1a5cbfea 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -300,6 +300,15 @@ void ThreadProxy::didLoseOutputSurfaceOnImplThread()
{
DCHECK(isImplThread());
TRACE_EVENT0("cc", "ThreadProxy::didLoseOutputSurfaceOnImplThread");
+ Proxy::implThread()->postTask(base::Bind(&ThreadProxy::checkOutputSurfaceStatusOnImplThread, m_implThreadWeakPtr));
+}
+
+void ThreadProxy::checkOutputSurfaceStatusOnImplThread()
+{
+ DCHECK(isImplThread());
+ TRACE_EVENT0("cc", "ThreadProxy::checkOutputSurfaceStatusOnImplThread");
+ if (!m_layerTreeHostImpl->isContextLost())
+ return;
m_schedulerOnImplThread->didLoseOutputSurface();
}
@@ -842,6 +851,9 @@ ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal
Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::didCommitAndDrawFrame, m_mainThreadWeakPtr));
}
+ if (drawFrame)
+ checkOutputSurfaceStatusOnImplThread();
+
return result;
}
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698