diff options
author | bsalomon <bsalomon@google.com> | 2014-10-14 11:47:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-14 11:47:22 -0700 |
commit | e30597375c19dfb5197fd065a3d1768401eb00fa (patch) | |
tree | d61474ce6dc1ed158456299951a194800e119ad4 /tests/WritePixelsTest.cpp | |
parent | ec87dc64dd40c1a4f80088023c94764caca79bf9 (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.cpp | 6 |
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; |