aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-10-07 06:20:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-07 06:20:25 -0700
commitebfce4149e70b563cff3d889515250db3a729ad1 (patch)
treecc224f3a846155d235010271961c88130cf3b391 /src/gpu
parentc1188aacd50c2e77ded8fddedd7d27c02d5a9e5d (diff)
Revert of Don't readback and reupload texture-backed bitmaps (patchset #1 id:1 of https://codereview.chromium.org/635573004/)
Reason for revert: This fails on some Android devices, missing part of tileimagefilter GM which were previously triggering the readback/upload code path. Original issue's description: > Don't readback and reupload texture-backed bitmaps > > Committed: https://skia.googlesource.com/skia/+/b9ab5631703c258f1aae7a3ca1bb4b6596b5b42c TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/632293002
Diffstat (limited to 'src/gpu')
-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();
}