From 5f33a8ccac141dfaddddc7b9fc39a8428cc233fe Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 26 Feb 2018 14:32:39 -0500 Subject: Start on new GPU pixel ops implementation. The new ops attempt to be less optimal by falling back to CPU conversions rather than relying on intermediate draws and complex coordination between GrContext and GrGpu to determine how conversions are performed. This adds the new writePixels implementation. Change-Id: I7496d86d5a40277ed2ca63668881c160e54d80d3 Reviewed-on: https://skia-review.googlesource.com/109880 Reviewed-by: Brian Osman Commit-Queue: Brian Salomon --- tests/WritePixelsTest.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'tests/WritePixelsTest.cpp') diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index f2ad10c4f3..1a0f7a549d 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp @@ -423,22 +423,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixelsNonTexture_Gpu, reporter, ctxInfo) for (int sampleCnt : {1, 4}) { GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, DEV_W, DEV_H, kSkia8888_GrPixelConfig, true, GrMipMapped::kNo); - SkColorType colorType; - if (kRGBA_8888_GrPixelConfig == kSkia8888_GrPixelConfig) { - colorType = kRGBA_8888_SkColorType; - } else { - colorType = kBGRA_8888_SkColorType; - } + SkColorType colorType = kN32_SkColorType; sk_sp surface(SkSurface::MakeFromBackendTextureAsRenderTarget( context, backendTex, origin, sampleCnt, colorType, nullptr, nullptr)); - if (!surface) { - gpu->deleteTestingOnlyBackendTexture(&backendTex); - continue; + if (surface) { + test_write_pixels(reporter, surface.get()); } - - test_write_pixels(reporter, surface.get()); - - surface.reset(); gpu->deleteTestingOnlyBackendTexture(&backendTex); } } -- cgit v1.2.3