Index: tests/WritePixelsTest.cpp |
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp |
index f47c67bd3b8b0be07370209c15fd12cb0f8843ae..567d99412ed62eabf4b5b8ea581de3d9985d04f8 100644 |
--- a/tests/WritePixelsTest.cpp |
+++ b/tests/WritePixelsTest.cpp |
@@ -319,9 +319,9 @@ static SkSurface* create_surface(const CanvasConfig& c, GrContext* grCtx) { |
desc.fConfig = kSkia8888_GrPixelConfig; |
desc.fOrigin = kGpu_TopLeft_DevType == c.fDevType ? |
kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; |
- GrAutoScratchTexture ast(grCtx, desc, GrContext::kExact_ScratchTexMatch); |
- SkAutoTUnref<GrTexture> tex(ast.detach()); |
- return SkSurface::NewRenderTargetDirect(tex->asRenderTarget()); |
+ SkAutoTUnref<GrTexture> texture( |
+ grCtx->refScratchTexture(desc, GrContext::kExact_ScratchTexMatch)); |
+ return SkSurface::NewRenderTargetDirect(texture->asRenderTarget()); |
#endif |
} |
return NULL; |