Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: tests/WritePixelsTest.cpp

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698