diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 06:37:25 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 06:37:25 +0000 |
commit | 7ba3ca741c8a5b174dd2ebdc0c3495857c402106 (patch) | |
tree | 28d5ab69d881ae807383166c98e95af5ea5e6cf4 /cc/resources/texture_mailbox.cc | |
parent | b5c8ccc922e201f1b7424d85380d5131de025101 (diff) | |
download | chromium_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/resources/texture_mailbox.cc')
-rw-r--r-- | cc/resources/texture_mailbox.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/resources/texture_mailbox.cc b/cc/resources/texture_mailbox.cc index b08ba6c..1f094d6 100644 --- a/cc/resources/texture_mailbox.cc +++ b/cc/resources/texture_mailbox.cc @@ -57,9 +57,10 @@ bool TextureMailbox::IsEmpty() const { return name_.IsZero(); } -void TextureMailbox::RunReleaseCallback(unsigned sync_point) const { +void TextureMailbox::RunReleaseCallback(unsigned sync_point, + bool lost_resource) const { if (!callback_.is_null()) - callback_.Run(sync_point); + callback_.Run(sync_point, lost_resource); } void TextureMailbox::SetName(const gpu::Mailbox& other) { |