diff options
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 3106377d84..b93f9c3269 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -14,6 +14,7 @@ #include "gl/GrGpuGL.h" #include "GrBackendEffectFactory.h" +#include "GrContextFactory.h" #include "effects/GrConfigConversionEffect.h" #include "SkRandom.h" @@ -147,9 +148,14 @@ bool GrGpuGL::programUnitTest() { return true; } -static void GLProgramsTest(skiatest::Reporter* reporter, GrContext* context) { - GrGpuGL* shadersGpu = static_cast<GrGpuGL*>(context->getGpu()); - REPORTER_ASSERT(reporter, shadersGpu->programUnitTest()); +static void GLProgramsTest(skiatest::Reporter* reporter, GrContextFactory* factory) { + for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { + GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(type)); + if (NULL != context) { + GrGpuGL* shadersGpu = static_cast<GrGpuGL*>(context->getGpu()); + REPORTER_ASSERT(reporter, shadersGpu->programUnitTest()); + } + } } #include "TestClassDef.h" |
