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

Unified Diff: cc/trees/thread_proxy.cc

Issue 504373002: Don't destroy RenderWidgetCompositor during DoDeferredClose (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 4a95140226db8fd2c72da44e632ebdd880bf1f5e..1485c61e1756c4ab611242d68d19b5ea30b6f18c 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -80,7 +80,9 @@ ThreadProxy::MainThreadOnly::MainThreadOnly(ThreadProxy* proxy,
manage_tiles_pending(false),
can_cancel_commit(true),
defer_commits(false),
- weak_factory(proxy) {}
+ host_client_finished_(false),
+ weak_factory(proxy) {
+}
ThreadProxy::MainThreadOnly::~MainThreadOnly() {}
@@ -155,6 +157,10 @@ void ThreadProxy::SetLayerTreeHostClientReady() {
impl_thread_weak_ptr_));
}
+void ThreadProxy::SetLayerTreeHostClientFinished() {
+ main().host_client_finished_ = true;
+}
+
void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() {
TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread");
impl().scheduler->SetCanStart();
@@ -218,6 +224,9 @@ void ThreadProxy::CreateAndInitializeOutputSurface() {
TRACE_EVENT0("cc", "ThreadProxy::DoCreateAndInitializeOutputSurface");
DCHECK(IsMainThread());
+ if (main().host_client_finished_)
+ return;
+
scoped_ptr<OutputSurface> output_surface =
layer_tree_host()->CreateOutputSurface();

Powered by Google App Engine
This is Rietveld 408576698