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