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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11883030: cc: Fix lost context handling when using impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test 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 | « no previous file | cc/layer_tree_host_unittest_context.cc » ('j') | cc/layer_tree_host_unittest_context.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index e6b9ac99e0d49ae673f001b56a4ce6ad514d74aa..39ef4829134910bc1fd967ece7edb66895ae8a72 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -966,10 +966,13 @@ bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurfa
// Since we will create a new resource provider, we cannot continue to use
// the old resources (i.e. renderSurfaces and texture IDs). Clear them
// before we destroy the old resource provider.
- if (rootLayer()) {
+ if (rootLayer())
clearRenderSurfaces();
- sendDidLoseOutputSurfaceRecursive(rootLayer());
- }
+ if (activeTree()->RootLayer())
+ sendDidLoseOutputSurfaceRecursive(activeTree()->RootLayer());
+ if (pendingTree() && pendingTree()->RootLayer())
+ sendDidLoseOutputSurfaceRecursive(pendingTree()->RootLayer());
+
// Note: order is important here.
m_renderer.reset();
m_tileManager.reset();
« no previous file with comments | « no previous file | cc/layer_tree_host_unittest_context.cc » ('j') | cc/layer_tree_host_unittest_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698