aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-09 15:30:41 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-09 15:30:41 +0000
commita44f7003e5f9d1353bc9274268fb5302e69fc94a (patch)
tree472bd5a0a4fab051f9ee2f9c812192d6694d4343 /src/gpu
parent47ae725dbd03cecba737d6445a7faa3241135728 (diff)
Fix some ref leaks
Review URL: http://codereview.appspot.com/4837068/ git-svn-id: http://skia.googlecode.com/svn/trunk@2082 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index c3754dcada..874ed8e422 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -130,8 +130,10 @@ static SkBitmap::Config grConfig2skConfig(GrPixelConfig config, bool* isOpaque)
}
static SkBitmap make_bitmap(GrContext* context, GrRenderTarget* renderTarget) {
+ SkAutoTUnref<GrRenderTarget> rtunref;
if (SkGpuDevice::Current3DApiRenderTarget() == renderTarget) {
renderTarget = context->createRenderTargetFrom3DApiState();
+ rtunref.reset(renderTarget);
}
GrTexture* texture = renderTarget->asTexture();
GrPixelConfig config = texture ? texture->config() : kRGBA_8888_GrPixelConfig;