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

Unified Diff: gm/texturedomaineffect.cpp

Issue 608883003: GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: remove todo 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 | « bench/GrResourceCacheBench.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texturedomaineffect.cpp
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 6534b0c1dd1c9c50b76f44f2cfda2f770c25c53e..acf039513db0ab0be6beb72b8a4596a3d3b53e0a 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -92,8 +92,8 @@ protected:
GrDrawState* drawState = tt.target()->drawState();
- GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fBmp, NULL);
- if (NULL == texture) {
+ SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, NULL));
+ if (!texture) {
return;
}
@@ -144,7 +144,6 @@ protected:
y += renderRect.height() + kTestPad;
}
}
- GrUnlockAndUnrefCachedBitmapTexture(texture);
}
private:
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698