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
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 262d339..e81abdb 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -372,10 +372,7 @@
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 @@
void GrUnlockAndUnrefCachedBitmapTexture(GrTexture* texture) {
SkASSERT(texture->getContext());
- if (texture->getCacheEntry()) {
- texture->getContext()->unlockScratchTexture(texture);
- }
+ texture->getContext()->unlockScratchTexture(texture);
texture->unref();
}