aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 14:46:47 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 14:46:47 +0000
commit95ed55adc6b8f0cee063c2cf2e14782773b0087f (patch)
tree0ff40233b89b318ba9eb573cc90dbf3e43c71da7 /src/effects/gradients
parentbaa0220dfddda3cd44f0ffb5f95a4a60443eb8c3 (diff)
Make all GrContext members that return a texture also ref the texture for the caller.
Review URL: https://codereview.appspot.com/7198049 git-svn-id: http://skia.googlecode.com/svn/trunk@7362 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/gradients')
-rw-r--r--src/effects/gradients/SkGradientShader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index cdbfd7c150..81a6659fbc 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -811,14 +811,14 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx,
fAtlas->getVerticalScaleFactor();
fTextureAccess.reset(fAtlas->getTexture(), params);
} else {
- GrTexture* texture = GrLockCachedBitmapTexture(ctx, bitmap, &params);
+ GrTexture* texture = GrLockAndRefCachedBitmapTexture(ctx, bitmap, &params);
fTextureAccess.reset(texture, params);
fYCoord = SK_ScalarHalf;
// Unlock immediately, this is not great, but we don't have a way of
// knowing when else to unlock it currently, so it may get purged from
// the cache, but it'll still be ref'd until it's no longer being used.
- GrUnlockCachedBitmapTexture(texture);
+ GrUnlockAndUnrefCachedBitmapTexture(texture);
}
this->addTextureAccess(&fTextureAccess);
}