diff options
author | 2014-09-30 06:02:23 -0700 | |
---|---|---|
committer | 2014-09-30 06:02:23 -0700 | |
commit | 3d398c876440deaab39bbf2a9b881c337e6dc8d4 (patch) | |
tree | b38c23d2b6742c9d515dd2b19a1cf8fca49a16f0 /gm/texturedomaineffect.cpp | |
parent | c0eb9b9818462471f5fc1c47fa549c6052d8bbae (diff) |
GrResourceCache2 manages scratch texture.
BUG=skia:
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/608883003
Diffstat (limited to 'gm/texturedomaineffect.cpp')
-rw-r--r-- | gm/texturedomaineffect.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index 6534b0c1dd..acf039513d 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: |