summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 22:50:38 +0000
committersenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 22:50:38 +0000
commitaa1c70d3bc9449db2a3bfd02c15875aafb17caa5 (patch)
treee30c8190b784b07354d0cc250a5feca2baad6a4d
parentf1b1db0631b9b253ca511119061ebf7fcfd814e9 (diff)
downloadchromium_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.cc3
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.