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: |