diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-01 17:31:02 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-01 17:31:02 +0000 |
commit | 671eac67ef5f44b80f882e06cf17f1b8f6802980 (patch) | |
tree | 2f3265269a680c193305661e528f141dc0244cb8 /src | |
parent | 81712883419f76e25d2ffec38a9438284a45a48d (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<GrTexture> 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<GrTexture> tex(ctx->createUncachedTexture(desc, NULL, 0)); if (NULL == tex) { return NULL; } |