diff options
-rw-r--r-- | src/gpu/SkGr.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 262d339b6c..e81abdbae4 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -372,10 +372,7 @@ bool GrIsBitmapInCache(const GrContext* ctx, GrTexture* GrLockAndRefCachedBitmapTexture(GrContext* ctx, const SkBitmap& bitmap, const GrTextureParams* params) { - GrTexture* result = bitmap.getTexture(); - if (result) { - return SkRef(result); - } + GrTexture* result = NULL; bool cache = !bitmap.isVolatile(); @@ -403,9 +400,7 @@ GrTexture* GrLockAndRefCachedBitmapTexture(GrContext* ctx, void GrUnlockAndUnrefCachedBitmapTexture(GrTexture* texture) { SkASSERT(texture->getContext()); - if (texture->getCacheEntry()) { - texture->getContext()->unlockScratchTexture(texture); - } + texture->getContext()->unlockScratchTexture(texture); texture->unref(); } |