aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 17:31:02 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 17:31:02 +0000
commit671eac67ef5f44b80f882e06cf17f1b8f6802980 (patch)
tree2f3265269a680c193305661e528f141dc0244cb8 /src
parent81712883419f76e25d2ffec38a9438284a45a48d (diff)
Fix leaks in SkSurface_Gpu.cpp
Diffstat (limited to 'src')
-rw-r--r--src/image/SkSurface_Gpu.cpp4
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;
}