Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 3547fbec94f4e372c5ee3dc70e7c0bd4a03effdd..666204e0aed451ad0f236c4cb72c26a7fa7945be 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -211,7 +211,7 @@ |
const SkGradientShaderBase& shader, const SkBitmap& device, |
const SkPaint& paint, const SkMatrix& matrix) |
: INHERITED(shader, device, paint, matrix) |
- , fCache(shader.refCache(getPaintAlpha())) |
+ , fCache(shader.getCache(getPaintAlpha())) |
{ |
const SkMatrix& inverse = this->getTotalInverse(); |
@@ -558,7 +558,7 @@ |
* The gradient holds a cache for the most recent value of alpha. Successive |
* callers with the same alpha value will share the same cache. |
*/ |
-SkGradientShaderBase::GradientShaderCache* SkGradientShaderBase::refCache(U8CPU alpha) const { |
+SkGradientShaderBase::GradientShaderCache* SkGradientShaderBase::getCache(U8CPU alpha) const { |
SkAutoMutexAcquire ama(fCacheMutex); |
if (!fCache || fCache->getAlpha() != alpha) { |
fCache.reset(SkNEW_ARGS(GradientShaderCache, (alpha, *this))); |
@@ -581,7 +581,7 @@ |
void SkGradientShaderBase::getGradientTableBitmap(SkBitmap* bitmap) const { |
// our caller assumes no external alpha, so we ensure that our cache is |
// built with 0xFF |
- SkAutoTUnref<GradientShaderCache> cache(this->refCache(0xFF)); |
+ GradientShaderCache* cache = this->getCache(0xFF); |
// don't have a way to put the mapper into our cache-key yet |
if (fMapper) { |