| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrContextFactory_DEFINED | 8 #ifndef GrContextFactory_DEFINED |
| 9 #define GrContextFactory_DEFINED | 9 #define GrContextFactory_DEFINED |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 static const int kContextTypeCnt = kLastContextType + 1; | 86 static const int kContextTypeCnt = kLastContextType + 1; |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Options for GL context creation. For historical and testing reasons the o
ptions will default | 89 * Options for GL context creation. For historical and testing reasons the o
ptions will default |
| 90 * to not using GL_NV_path_rendering extension even when the driver support
s it. | 90 * to not using GL_NV_path_rendering extension even when the driver support
s it. |
| 91 */ | 91 */ |
| 92 enum ContextOptions { | 92 enum ContextOptions { |
| 93 kNone_ContextOptions = 0x0, | 93 kNone_ContextOptions = 0x0, |
| 94 kEnableNVPR_ContextOptions = 0x1, | 94 kEnableNVPR_ContextOptions = 0x1, |
| 95 kRequireSRGBSupport_ContextOptions = 0x2, | 95 kUseInstanced_ContextOptions = 0x2, |
| 96 kRequireSRGBSupport_ContextOptions = 0x4, |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 static ContextType NativeContextTypeForBackend(GrBackend backend) { | 99 static ContextType NativeContextTypeForBackend(GrBackend backend) { |
| 99 switch (backend) { | 100 switch (backend) { |
| 100 case kOpenGL_GrBackend: | 101 case kOpenGL_GrBackend: |
| 101 return kNativeGL_ContextType; | 102 return kNativeGL_ContextType; |
| 102 case kVulkan_GrBackend: | 103 case kVulkan_GrBackend: |
| 103 return kVulkan_ContextType; | 104 return kVulkan_ContextType; |
| 104 default: | 105 default: |
| 105 SkFAIL("Unknown backend"); | 106 SkFAIL("Unknown backend"); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 TestContext* fTestContext; | 180 TestContext* fTestContext; |
| 180 GrContext* fGrContext; | 181 GrContext* fGrContext; |
| 181 bool fAbandoned; | 182 bool fAbandoned; |
| 182 }; | 183 }; |
| 183 SkTArray<Context, true> fContexts; | 184 SkTArray<Context, true> fContexts; |
| 184 SkAutoTDelete<GLTestContext> fSentinelGLContext; | 185 SkAutoTDelete<GLTestContext> fSentinelGLContext; |
| 185 const GrContextOptions fGlobalOptions; | 186 const GrContextOptions fGlobalOptions; |
| 186 }; | 187 }; |
| 187 } // namespace sk_gpu_test | 188 } // namespace sk_gpu_test |
| 188 #endif | 189 #endif |
| OLD | NEW |