Index: tests/WritePixelsTest.cpp |
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp |
index ec88f03c2b723634fc4afecb3c1bb3b09a76d975..1839a4018338435cfc55c6d29e2a189ad71485c2 100644 |
--- a/tests/WritePixelsTest.cpp |
+++ b/tests/WritePixelsTest.cpp |
@@ -407,16 +407,11 @@ DEF_TEST(WritePixels, reporter) { |
} |
#if SK_SUPPORT_GPU |
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, ctxInfo) { |
+ const SkImageInfo ii = SkImageInfo::MakeN32Premul(DEV_W, DEV_H); |
+ |
for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) { |
- GrSurfaceDesc desc; |
- desc.fFlags = kRenderTarget_GrSurfaceFlag; |
- desc.fWidth = DEV_W; |
- desc.fHeight = DEV_H; |
- desc.fConfig = kSkia8888_GrPixelConfig; |
- desc.fOrigin = origin; |
- SkAutoTUnref<GrTexture> texture( |
- ctxInfo.grContext()->textureProvider()->createTexture(desc, SkBudgeted::kNo)); |
- auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarget(), nullptr)); |
+ sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kNo, |
+ ii, 0, origin, nullptr)); |
test_write_pixels(reporter, surface.get()); |
} |
} |