aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/WritePixelsTest.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-10-14 11:47:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-14 11:47:22 -0700
commite30597375c19dfb5197fd065a3d1768401eb00fa (patch)
treed61474ce6dc1ed158456299951a194800e119ad4 /tests/WritePixelsTest.cpp
parentec87dc64dd40c1a4f80088023c94764caca79bf9 (diff)
Remove uses of GrAutoScratchTexture.
Rename GrContext::lockAndRefScratchTexture to refScratchTexture. GrSurface::writePixels returns bool instead of void. BUG=skia:2889 Review URL: https://codereview.chromium.org/638403003
Diffstat (limited to 'tests/WritePixelsTest.cpp')
-rw-r--r--tests/WritePixelsTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index f47c67bd3b..567d99412e 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;