| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 static const int kGLContextTypeCnt = kLastGLContextType + 1; | 47 static const int kGLContextTypeCnt = kLastGLContextType + 1; |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Options for GL context creation. For historical and testing reasons the o
ptions will default | 50 * Options for GL context creation. For historical and testing reasons the o
ptions will default |
| 51 * to not using GL_NV_path_rendering extension even when the driver support
s it. | 51 * to not using GL_NV_path_rendering extension even when the driver support
s it. |
| 52 */ | 52 */ |
| 53 enum GLContextOptions { | 53 enum GLContextOptions { |
| 54 kNone_GLContextOptions = 0, | 54 kNone_GLContextOptions = 0, |
| 55 kEnableNVPR_GLContextOptions = 0x1, | 55 kEnableNVPR_GLContextOptions = 0x1, |
| 56 kRequireSRGBSupport_GLContextOptions = 0x2, |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 static bool IsRenderingGLContext(GLContextType type) { | 59 static bool IsRenderingGLContext(GLContextType type) { |
| 59 switch (type) { | 60 switch (type) { |
| 60 case kNull_GLContextType: | 61 case kNull_GLContextType: |
| 61 case kDebug_GLContextType: | 62 case kDebug_GLContextType: |
| 62 return false; | 63 return false; |
| 63 default: | 64 default: |
| 64 return true; | 65 return true; |
| 65 } | 66 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 GLContextType fType; | 136 GLContextType fType; |
| 136 GLContextOptions fOptions; | 137 GLContextOptions fOptions; |
| 137 SkGLContext* fGLContext; | 138 SkGLContext* fGLContext; |
| 138 GrContext* fGrContext; | 139 GrContext* fGrContext; |
| 139 }; | 140 }; |
| 140 SkTArray<Context, true> fContexts; | 141 SkTArray<Context, true> fContexts; |
| 141 const GrContextOptions fGlobalOptions; | 142 const GrContextOptions fGlobalOptions; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 #endif | 145 #endif |
| OLD | NEW |