diff options
author | 2014-09-30 06:02:23 -0700 | |
---|---|---|
committer | 2014-09-30 06:02:23 -0700 | |
commit | 3d398c876440deaab39bbf2a9b881c337e6dc8d4 (patch) | |
tree | b38c23d2b6742c9d515dd2b19a1cf8fca49a16f0 /src/core/SkBitmapProcShader.cpp | |
parent | c0eb9b9818462471f5fc1c47fa549c6052d8bbae (diff) |
GrResourceCache2 manages scratch texture.
BUG=skia:
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/608883003
Diffstat (limited to 'src/core/SkBitmapProcShader.cpp')
-rw-r--r-- | src/core/SkBitmapProcShader.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index 9c900d35f8..a9798b8e24 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -459,9 +459,9 @@ bool SkBitmapProcShader::asFragmentProcessor(GrContext* context, const SkPaint& } GrTextureParams params(tm, textureFilterMode); - GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fRawBitmap, ¶ms); + SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fRawBitmap, ¶ms)); - if (NULL == texture) { + if (!texture) { SkErrorInternals::SetError( kInternalError_SkError, "Couldn't convert bitmap to texture."); return false; @@ -476,7 +476,6 @@ bool SkBitmapProcShader::asFragmentProcessor(GrContext* context, const SkPaint& } else { *fp = GrSimpleTextureEffect::Create(texture, matrix, params); } - GrUnlockAndUnrefCachedBitmapTexture(texture); return true; } |