Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: src/gpu/SkGr.cpp

Issue 632293002: Revert of Don't readback and reupload texture-backed bitmaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 262d339b6c673763236b66fb8a4e318c7e02fecd..e81abdbae475c14a3d99a17afed4601b6cad2a53 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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698