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 16 matching lines...) Expand all Loading... |
27 kNative_GLContextType, //! OpenGL or OpenGL ES context. | 27 kNative_GLContextType, //! OpenGL or OpenGL ES context. |
28 kGL_GLContextType, //! OpenGL context. | 28 kGL_GLContextType, //! OpenGL context. |
29 kGLES_GLContextType, //! OpenGL ES context. | 29 kGLES_GLContextType, //! OpenGL ES context. |
30 #if SK_ANGLE | 30 #if SK_ANGLE |
31 #ifdef SK_BUILD_FOR_WIN | 31 #ifdef SK_BUILD_FOR_WIN |
32 kANGLE_GLContextType, //! ANGLE on DirectX OpenGL ES context. | 32 kANGLE_GLContextType, //! ANGLE on DirectX OpenGL ES context. |
33 #endif | 33 #endif |
34 kANGLE_GL_GLContextType, //! ANGLE on OpenGL OpenGL ES context. | 34 kANGLE_GL_GLContextType, //! ANGLE on OpenGL OpenGL ES context. |
35 #endif | 35 #endif |
36 #if SK_COMMAND_BUFFER | 36 #if SK_COMMAND_BUFFER |
37 kCommandBuffer_GLContextType, //! Chromium command buffer OpenGL ES cont
ext. | 37 kCommandBufferES2_GLContextType, //! Chromium command buffer OpenGL ES 2
.0 context. |
| 38 kCommandBufferES3_GLContextType, //! Chromium command buffer OpenGL ES 3
.0 context. |
| 39 //! Not ready for production. |
38 #endif | 40 #endif |
39 #if SK_MESA | 41 #if SK_MESA |
40 kMESA_GLContextType, //! MESA OpenGL context | 42 kMESA_GLContextType, //! MESA OpenGL context |
41 #endif | 43 #endif |
42 kNull_GLContextType, //! Non-rendering OpenGL mock context. | 44 kNull_GLContextType, //! Non-rendering OpenGL mock context. |
43 kDebug_GLContextType, //! Non-rendering, state verifying OpenGL context. | 45 kDebug_GLContextType, //! Non-rendering, state verifying OpenGL context. |
44 kLastGLContextType = kDebug_GLContextType | 46 kLastGLContextType = kDebug_GLContextType |
45 }; | 47 }; |
46 | 48 |
47 static const int kGLContextTypeCnt = kLastGLContextType + 1; | 49 static const int kGLContextTypeCnt = kLastGLContextType + 1; |
(...skipping 27 matching lines...) Expand all Loading... |
75 return "gles"; | 77 return "gles"; |
76 #if SK_ANGLE | 78 #if SK_ANGLE |
77 #ifdef SK_BUILD_FOR_WIN | 79 #ifdef SK_BUILD_FOR_WIN |
78 case kANGLE_GLContextType: | 80 case kANGLE_GLContextType: |
79 return "angle"; | 81 return "angle"; |
80 #endif | 82 #endif |
81 case kANGLE_GL_GLContextType: | 83 case kANGLE_GL_GLContextType: |
82 return "angle-gl"; | 84 return "angle-gl"; |
83 #endif | 85 #endif |
84 #if SK_COMMAND_BUFFER | 86 #if SK_COMMAND_BUFFER |
85 case kCommandBuffer_GLContextType: | 87 case kCommandBufferES2_GLContextType: |
86 return "commandbuffer"; | 88 return "commandbuffer"; |
| 89 case kCommandBufferES3_GLContextType: |
| 90 return "commandbuffer3"; |
87 #endif | 91 #endif |
88 #if SK_MESA | 92 #if SK_MESA |
89 case kMESA_GLContextType: | 93 case kMESA_GLContextType: |
90 return "mesa"; | 94 return "mesa"; |
91 #endif | 95 #endif |
92 case kNull_GLContextType: | 96 case kNull_GLContextType: |
93 return "null"; | 97 return "null"; |
94 case kDebug_GLContextType: | 98 case kDebug_GLContextType: |
95 return "debug"; | 99 return "debug"; |
96 default: | 100 default: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 GLContextType fType; | 139 GLContextType fType; |
136 GLContextOptions fOptions; | 140 GLContextOptions fOptions; |
137 SkGLContext* fGLContext; | 141 SkGLContext* fGLContext; |
138 GrContext* fGrContext; | 142 GrContext* fGrContext; |
139 }; | 143 }; |
140 SkTArray<Context, true> fContexts; | 144 SkTArray<Context, true> fContexts; |
141 const GrContextOptions fGlobalOptions; | 145 const GrContextOptions fGlobalOptions; |
142 }; | 146 }; |
143 | 147 |
144 #endif | 148 #endif |
OLD | NEW |