diff options
author | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 18:03:42 +0000 |
---|---|---|
committer | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 18:03:42 +0000 |
commit | 7c98a2f0ad81c5e8245cf66cf426c487e3a0eb4b (patch) | |
tree | 8d185bd9cf318046eb0991196acf8569fdf18fce /cc/test/test_in_process_context_provider.cc | |
parent | 17d0f50c5e9452d0c38c77b711d8d03fdd55272b (diff) | |
download | chromium_src-7c98a2f0ad81c5e8245cf66cf426c487e3a0eb4b.zip chromium_src-7c98a2f0ad81c5e8245cf66cf426c487e3a0eb4b.tar.gz chromium_src-7c98a2f0ad81c5e8245cf66cf426c487e3a0eb4b.tar.bz2 |
Fix skia ganesh resources leak.
Currently, ~GrContextForWebGraphicsContext3D() calls
GrContext::contextDestroyed() before destructing a context provider. It causes
gpu resource leak because contextDestroyed() abandons all gpu resources, so
GrContext destructor cannot have a chance to clean gpu resources.
chromium doesn't need to use GrContext::contextDestroyed() because chromium
controls the lifecycle of a context provider. However, when a context provider
is lost, chromium must call GrContext::contextLost().
In addition, TestInProcessContextProvider must destruct GrContext before
destructing gpu::GLInProcessContext.
BUG=360107
Review URL: https://codereview.chromium.org/226203004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_in_process_context_provider.cc')
-rw-r--r-- | cc/test/test_in_process_context_provider.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc index eff0b2c..fbd3335 100644 --- a/cc/test/test_in_process_context_provider.cc +++ b/cc/test/test_in_process_context_provider.cc @@ -49,8 +49,6 @@ TestInProcessContextProvider::TestInProcessContextProvider() : context_(CreateTestInProcessContext()) {} TestInProcessContextProvider::~TestInProcessContextProvider() { - if (gr_context_) - gr_context_->contextDestroyed(); } bool TestInProcessContextProvider::BindToCurrentThread() { return true; } |