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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 99553002: cc: Prevent ResourceUpdateContoller from uploading textures after lost context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/resources/resource_update_controller_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 3ab5385e93557778e1d28dea05215cb9a6ca369d..d621368253c88933c6b53e87599ff394bed8d633 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1460,6 +1460,8 @@ gfx::SizeF LayerTreeHostImpl::UnscaledScrollableViewportSize() const {
}
void LayerTreeHostImpl::DidLoseOutputSurface() {
+ if (resource_provider_)
+ resource_provider_->DidLoseOutputSurface();
// TODO(jamesr): The renderer_ check is needed to make some of the
// LayerTreeHostContextTest tests pass, but shouldn't be necessary (or
// important) in production. We should adjust the test to not need this.
@@ -1710,8 +1712,6 @@ bool LayerTreeHostImpl::InitializeRenderer(
// the old resources (i.e. render_surfaces and texture IDs). Clear them
// before we destroy the old resource provider.
ReleaseTreeResources();
- if (resource_provider_)
- resource_provider_->DidLoseOutputSurface();
// Note: order is important here.
renderer_.reset();
« no previous file with comments | « cc/resources/resource_update_controller_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698