diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 22:50:38 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 22:50:38 +0000 |
commit | aa1c70d3bc9449db2a3bfd02c15875aafb17caa5 (patch) | |
tree | e30c8190b784b07354d0cc250a5feca2baad6a4d | |
parent | f1b1db0631b9b253ca511119061ebf7fcfd814e9 (diff) | |
download | chromium_src-aa1c70d3bc9449db2a3bfd02c15875aafb17caa5.zip chromium_src-aa1c70d3bc9449db2a3bfd02c15875aafb17caa5.tar.gz chromium_src-aa1c70d3bc9449db2a3bfd02c15875aafb17caa5.tar.bz2 |
Fix texture leak in applyImageFilter().
Review URL: https://chromiumcodereview.appspot.com/11347018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164758 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/gl_renderer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc index 37add03..1c4fec2 100644 --- a/cc/gl_renderer.cc +++ b/cc/gl_renderer.cc @@ -408,9 +408,10 @@ static SkBitmap applyImageFilter(GLRenderer* renderer, SkImageFilter* filter, Sc desc.fHeight = source.height(); desc.fConfig = kSkia8888_GrPixelConfig; GrAutoScratchTexture scratchTexture(grContext, desc, GrContext::kExact_ScratchTexMatch); + SkAutoTUnref<GrTexture> backingStore(scratchTexture.detach()); // Create a device and canvas using that backing store. - SkGpuDevice device(grContext, scratchTexture.detach()); + SkGpuDevice device(grContext, backingStore.get()); SkCanvas canvas(&device); // Draw the source bitmap through the filter to the canvas. |