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

Unified Diff: tests/ImageNewShaderTest.cpp

Issue 1448873002: Generate list of GPU contexts outside tests (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-01-gpu-test-context-support
Patch Set: make blurtest for all rendering contexts Created 5 years, 1 month 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/ImageIsOpaqueTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageNewShaderTest.cpp
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index c01fbe7ee8bdab01e60c612d3c65cfbfe549f18d..2c25b90c694c71dac70df82649bdf4d50f7c0de3 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -5,17 +5,17 @@
* found in the LICENSE file.
*/
-#include "SkTypes.h"
-#if SK_SUPPORT_GPU
-#include "GrContextFactory.h"
-#endif
#include "SkCanvas.h"
#include "SkImage.h"
#include "SkShader.h"
#include "SkSurface.h"
-
+#include "SkTypes.h"
#include "Test.h"
+#if SK_SUPPORT_GPU
+#include "GrContext.h"
+#endif
+
void testBitmapEquality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) {
SkAutoLockPixels lockBm1(bm1);
SkAutoLockPixels lockBm2(bm2);
@@ -143,29 +143,15 @@ void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) {
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
-DEF_GPUTEST(ImageNewShader_GPU, reporter, factory) {
- for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
- GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContextType) i;
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, context) {
+ // GPU -> GPU
+ gpuToGpu(reporter, context);
- if (!GrContextFactory::IsRenderingGLContext(glCtxType)) {
- continue;
- }
-
- GrContext* context = factory->get(glCtxType);
-
- if (nullptr == context) {
- continue;
- }
+ // GPU -> RASTER
+ gpuToRaster(reporter, context);
- // GPU -> GPU
- gpuToGpu(reporter, context);
-
- // GPU -> RASTER
- gpuToRaster(reporter, context);
-
- // RASTER -> GPU
- rasterToGpu(reporter, context);
- }
+ // RASTER -> GPU
+ rasterToGpu(reporter, context);
}
#endif
« no previous file with comments | « tests/ImageIsOpaqueTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698