Index: tests/ReadPixelsTest.cpp |
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp |
index 77aac1fdd50a382dce7465e226884d08aa0054e5..b2f3c7fa833390b28729be81f2b1039bbb00c0eb 100644 |
--- a/tests/ReadPixelsTest.cpp |
+++ b/tests/ReadPixelsTest.cpp |
@@ -318,9 +318,9 @@ DEF_GPUTEST(ReadPixels, reporter, factory) { |
desc.fHeight = DEV_H; |
desc.fConfig = kSkia8888_GrPixelConfig; |
desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin : kTopLeft_GrSurfaceOrigin; |
- GrAutoScratchTexture ast(context, desc, GrContext::kExact_ScratchTexMatch); |
- SkAutoTUnref<GrTexture> tex(ast.detach()); |
- surface.reset(SkSurface::NewRenderTargetDirect(tex->asRenderTarget())); |
+ SkAutoTUnref<GrTexture> texture( |
+ context->refScratchTexture(desc, GrContext::kExact_ScratchTexMatch)); |
+ surface.reset(SkSurface::NewRenderTargetDirect(texture->asRenderTarget())); |
#else |
continue; |
#endif |