diff options
Diffstat (limited to 'tests/ImageNewShaderTest.cpp')
-rw-r--r-- | tests/ImageNewShaderTest.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp index b4349e0633..f34d066f6b 100644 --- a/tests/ImageNewShaderTest.cpp +++ b/tests/ImageNewShaderTest.cpp @@ -92,17 +92,29 @@ void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { } DEF_GPUTEST(ImageNewShader_GPU, reporter, factory) { - GrContext* context = factory->get(GrContextFactory::kNative_GLContextType); + for (int i= 0; i < GrContextFactory::kGLContextTypeCnt; ++i) { + GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContextType) i; - // GPU -> GPU - gpuToGpu(reporter, context); + if (!GrContextFactory::IsRenderingGLContext(glCtxType)) { + continue; + } - // GPU -> RASTER - gpuToRaster(reporter, context); + GrContext* context = factory->get(glCtxType); + if (NULL == context) { + continue; + } - // RASTER -> GPU - rasterToGpu(reporter, context); + // GPU -> GPU + gpuToGpu(reporter, context); + + // GPU -> RASTER + gpuToRaster(reporter, context); + + + // RASTER -> GPU + rasterToGpu(reporter, context); + } } #endif |