From 671eac67ef5f44b80f882e06cf17f1b8f6802980 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Thu, 1 Nov 2012 17:31:02 +0000 Subject: Fix leaks in SkSurface_Gpu.cpp https://codereview.appspot.com/6826046/ git-svn-id: http://skia.googlecode.com/svn/trunk@6244 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/image/SkSurface_Gpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 3c1842a464..34031f2301 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -92,7 +92,7 @@ void SkSurface_Gpu::onCopyOnWrite(SkImage* image, SkCanvas* canvas) { desc.fConfig = SkBitmapConfig2GrPixelConfig(fDevice->config()); desc.fSampleCnt = 0; - GrTexture* tex = fDevice->context()->createUncachedTexture(desc, NULL, 0); + SkAutoTUnref tex(fDevice->context()->createUncachedTexture(desc, NULL, 0)); if (NULL == tex) { SkTextureImageSetTexture(image, NULL); return; @@ -131,7 +131,7 @@ SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, const SkImage::Info& info, desc.fConfig = SkBitmapConfig2GrPixelConfig(config); desc.fSampleCnt = sampleCount; - GrTexture* tex = ctx->createUncachedTexture(desc, NULL, 0); + SkAutoTUnref tex(ctx->createUncachedTexture(desc, NULL, 0)); if (NULL == tex) { return NULL; } -- cgit v1.2.3