Run debug gl context for DEF_GPU_TEST_FOR_ALL_CONTEXTS
authorkkinnunen <kkinnunen@nvidia.com>
Fri, 11 Dec 2015 07:19:29 +0000 (23:19 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 11 Dec 2015 07:19:29 +0000 (23:19 -0800)
Run debug gl context for tests defined with
DEF_GPU_TEST_FOR_ALL_CONTEXTS.

Review URL: https://codereview.chromium.org/1514023002

dm/DM.cpp
tests/Test.h

index d500103..c7e0934 100644 (file)
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1185,12 +1185,12 @@ void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* repo
         int contextSelector = kNone_GPUTestContexts;
         if (GrContextFactory::IsRenderingGLContext(glCtxType)) {
             contextSelector |= kAllRendering_GPUTestContexts;
-        }
-        if (glCtxType == GrContextFactory::kNative_GLContextType) {
+        } else if (glCtxType == GrContextFactory::kNative_GLContextType) {
             contextSelector |= kNative_GPUTestContexts;
-        }
-        if (glCtxType == GrContextFactory::kNull_GLContextType) {
+        } else if (glCtxType == GrContextFactory::kNull_GLContextType) {
             contextSelector |= kNull_GPUTestContexts;
+        } else if (glCtxType == GrContextFactory::kDebug_GLContextType) {
+            contextSelector |= kDebug_GPUTestContexts;
         }
         if ((testContexts & contextSelector) == 0) {
             continue;
index be2ef1f..fb0fd1f 100644 (file)
@@ -74,10 +74,13 @@ typedef SkTRegistry<Test> TestRegistry;
 enum GPUTestContexts {
     kNone_GPUTestContexts         = 0,
     kNull_GPUTestContexts         = 1,
-    kNative_GPUTestContexts       = 1 << 1,
-    kOther_GPUTestContexts        = 1 << 2, // Other than native, used only for below.
+    kDebug_GPUTestContexts        = 1 << 1,
+    kNative_GPUTestContexts       = 1 << 2,
+    kOther_GPUTestContexts        = 1 << 3, // Other than native, used only for below.
     kAllRendering_GPUTestContexts = kNative_GPUTestContexts | kOther_GPUTestContexts,
-    kAll_GPUTestContexts          = kAllRendering_GPUTestContexts | kNull_GPUTestContexts
+    kAll_GPUTestContexts          = kAllRendering_GPUTestContexts
+                                       | kNull_GPUTestContexts
+                                       | kDebug_GPUTestContexts
 };
 template<typename T>
 void RunWithGPUTestContexts(T testFunction, GPUTestContexts contexts, Reporter* reporter,