aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrContextFactoryTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/GrContextFactoryTest.cpp')
-rw-r--r--tests/GrContextFactoryTest.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index 50bdedff9e..1b19ac68e3 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -17,10 +17,14 @@ DEF_GPUTEST(GrContextFactory_NVPRContextOptionHasPathRenderingSupport, reporter,
// Test that if NVPR is requested, the context always has path rendering
// or the context creation fails.
GrContextFactory testFactory;
- GrContext* context = testFactory.get(GrContextFactory::kNative_GLContextType,
- kNone_GrGLStandard,
- GrContextFactory::kEnableNVPR_GLContextOptions);
- if (context) {
+ // Test that if NVPR is possible, caps are in sync.
+ for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
+ GrContextFactory::GLContextType glCtxType = static_cast<GrContextFactory::GLContextType>(i);
+ GrContext* context = testFactory.get(glCtxType,
+ GrContextFactory::kEnableNVPR_GLContextOptions);
+ if (!context) {
+ continue;
+ }
REPORTER_ASSERT(
reporter,
context->caps()->shaderCaps()->pathRenderingSupport());