aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp9
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();
}