Index: tools/gpu/GrContextFactory.h |
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h |
index d6baffc0ead7e93c6282cadde1a42882f6420706..a822ac786832f461248fa65b8fcad83fb11e1634 100644 |
--- a/tools/gpu/GrContextFactory.h |
+++ b/tools/gpu/GrContextFactory.h |
@@ -68,18 +68,15 @@ |
// The availability of context types is subject to platform and build configuration |
// restrictions. |
enum ContextType { |
- kGL_ContextType, //! OpenGL context. |
- kGLES_ContextType, //! OpenGL ES context. |
- kANGLE_D3D9_ES2_ContextType, //! ANGLE on Direct3D9 OpenGL ES 2 context. |
- kANGLE_D3D11_ES2_ContextType,//! ANGLE on Direct3D11 OpenGL ES 2 context. |
- kANGLE_D3D11_ES3_ContextType,//! ANGLE on Direct3D11 OpenGL ES 3 context. |
- kANGLE_GL_ES2_ContextType, //! ANGLE on OpenGL OpenGL ES 2 context. |
- kANGLE_GL_ES3_ContextType, //! ANGLE on OpenGL OpenGL ES 3 context. |
- kCommandBuffer_ContextType, //! Chromium command buffer OpenGL ES context. |
- kMESA_ContextType, //! MESA OpenGL context |
- kNullGL_ContextType, //! Non-rendering OpenGL mock context. |
- kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context. |
- kVulkan_ContextType, //! Vulkan |
+ kGL_ContextType, //! OpenGL context. |
+ kGLES_ContextType, //! OpenGL ES context. |
+ kANGLE_ContextType, //! ANGLE on DirectX OpenGL ES context. |
+ kANGLE_GL_ContextType, //! ANGLE on OpenGL OpenGL ES context. |
+ kCommandBuffer_ContextType, //! Chromium command buffer OpenGL ES context. |
+ kMESA_ContextType, //! MESA OpenGL context |
+ kNullGL_ContextType, //! Non-rendering OpenGL mock context. |
+ kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context. |
+ kVulkan_ContextType, //! Vulkan |
kLastContextType = kVulkan_ContextType |
}; |
@@ -130,6 +127,29 @@ |
} |
} |
+ static const char* ContextTypeName(ContextType type) { |
+ switch (type) { |
+ case kGL_ContextType: |
+ return "gl"; |
+ case kGLES_ContextType: |
+ return "gles"; |
+ case kANGLE_ContextType: |
+ return "angle"; |
+ case kANGLE_GL_ContextType: |
+ return "angle-gl"; |
+ case kCommandBuffer_ContextType: |
+ return "commandbuffer"; |
+ case kMESA_ContextType: |
+ return "mesa"; |
+ case kNullGL_ContextType: |
+ return "nullgl"; |
+ case kDebugGL_ContextType: |
+ return "debuggl"; |
+ case kVulkan_ContextType: |
+ return "vulkan"; |
+ } |
+ } |
+ |
explicit GrContextFactory(const GrContextOptions& opts); |
GrContextFactory(); |