| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 | 9 |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| 11 | 11 |
| 12 #include "GrContextFactory.h" | 12 #include "GrContextFactory.h" |
| 13 #include "GrCaps.h" | 13 #include "GrCaps.h" |
| 14 #include "Test.h" | 14 #include "Test.h" |
| 15 | 15 |
| 16 DEF_GPUTEST(GrContextFactoryNVPRContextOptions, reporter, /*factory*/) { | 16 DEF_GPUTEST(GrContextFactoryNVPRContextOptions, reporter, /*factory*/) { |
| 17 GrContextFactory testFactory; | 17 GrContextFactory testFactory; |
| 18 // Test that if NVPR is possible, caps are in sync. | 18 // Test that if NVPR is possible, caps are in sync. |
| 19 for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) { | 19 for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) { |
| 20 GrContextFactory::GLContextType glCtxType = static_cast<GrContextFactory
::GLContextType>(i); | 20 GrContextFactory::GLContextType glCtxType = static_cast<GrContextFactory
::GLContextType>(i); |
| 21 GrContext* context = testFactory.get(glCtxType, | 21 GrContext* context = testFactory.get(glCtxType, |
| 22 kNone_GrGLStandard, | |
| 23 GrContextFactory::kEnableNVPR_GLCon
textOptions); | 22 GrContextFactory::kEnableNVPR_GLCon
textOptions); |
| 24 if (!context) { | 23 if (!context) { |
| 25 continue; | 24 continue; |
| 26 } | 25 } |
| 27 REPORTER_ASSERT( | 26 REPORTER_ASSERT( |
| 28 reporter, | 27 reporter, |
| 29 context->caps()->shaderCaps()->pathRenderingSupport()); | 28 context->caps()->shaderCaps()->pathRenderingSupport()); |
| 30 } | 29 } |
| 31 } | 30 } |
| 32 | 31 |
| 33 #endif | 32 #endif |
| OLD | NEW |