summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 06:37:25 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 06:37:25 +0000
commit7ba3ca741c8a5b174dd2ebdc0c3495857c402106 (patch)
tree28d5ab69d881ae807383166c98e95af5ea5e6cf4 /cc/trees
parentb5c8ccc922e201f1b7424d85380d5131de025101 (diff)
downloadchromium_src-7ba3ca741c8a5b174dd2ebdc0c3495857c402106.zip
chromium_src-7ba3ca741c8a5b174dd2ebdc0c3495857c402106.tar.gz
chromium_src-7ba3ca741c8a5b174dd2ebdc0c3495857c402106.tar.bz2
cc: Delete resources when ResourceProvider shuts down.
When the ResourceProvider is destroyed, it should destroy the resources it owns, and notify the creators of the resources that they are released (in the TextureMailbox case). If the context is lost, then callback should inform the creator that the resource is destroyed in the callback. So a bool is added to make this information known. If a resource is in use in the parent, it will be leaked still, which is a known issue and will be addressed in the future. Tests: ResourceProviderTest.Shutdown ResourceProviderTest.LostContext ResourceProviderTest.ShutdownWithExportedResource R=piman BUG=230126 Review URL: https://chromiumcodereview.appspot.com/13887008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_impl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 756c654..7b0a7e1 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1306,6 +1306,8 @@ bool LayerTreeHostImpl::InitializeRenderer(
SendDidLoseOutputSurfaceRecursive(pending_tree_->root_layer());
if (recycle_tree_ && recycle_tree_->root_layer())
SendDidLoseOutputSurfaceRecursive(recycle_tree_->root_layer());
+ if (resource_provider_)
+ resource_provider_->DidLoseOutputSurface();
// Note: order is important here.
renderer_.reset();