Index: src/core/SkBitmapProcShader.cpp |
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp |
index a9798b8e24c3d4e816eac484b561ae3d00ef7e67..9c900d35f85ae5e30f734e2927321d32676e82bf 100644 |
--- a/src/core/SkBitmapProcShader.cpp |
+++ b/src/core/SkBitmapProcShader.cpp |
@@ -459,9 +459,9 @@ |
} |
GrTextureParams params(tm, textureFilterMode); |
- SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fRawBitmap, ¶ms)); |
- |
- if (!texture) { |
+ GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fRawBitmap, ¶ms); |
+ |
+ if (NULL == texture) { |
SkErrorInternals::SetError( kInternalError_SkError, |
"Couldn't convert bitmap to texture."); |
return false; |
@@ -476,6 +476,7 @@ |
} else { |
*fp = GrSimpleTextureEffect::Create(texture, matrix, params); |
} |
+ GrUnlockAndUnrefCachedBitmapTexture(texture); |
return true; |
} |