Chromium Code Reviews| Index: gpu/command_buffer/tests/gl_manager.h |
| diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h |
| index e909e470c7b2151f6e5e8df51fac47cfc8985928..1fb3073715431ffbe192de82d02141a257a66b55 100644 |
| --- a/gpu/command_buffer/tests/gl_manager.h |
| +++ b/gpu/command_buffer/tests/gl_manager.h |
| @@ -45,6 +45,12 @@ class ShareGroup; |
| class GLManager : private GpuControl { |
| public: |
| + enum ContextType { |
|
Zhenyao Mo
2015/08/28 17:16:25
Can we not redefine this, but instead, use the one
Kimmo Kinnunen
2015/08/31 12:23:13
Done.
|
| + CONTEXT_TYPE_WEBGL1, |
| + CONTEXT_TYPE_WEBGL2, |
| + CONTEXT_TYPE_OPENGLES2, |
| + CONTEXT_TYPE_OPENGLES3 |
| + }; |
| struct Options { |
| Options(); |
| // The size of the backbuffer. |
| @@ -61,10 +67,8 @@ class GLManager : private GpuControl { |
| bool lose_context_when_out_of_memory; |
| // Whether or not it's ok to lose the context. |
| bool context_lost_allowed; |
| - // 0 indicates not WebGL context - default. |
| - // 1 indicates WebGL 1 context. |
| - // 2 indicates WebGL 2 context. |
| - unsigned webgl_version; |
| + |
| + ContextType context_type; |
| }; |
| GLManager(); |
| ~GLManager() override; |
| @@ -78,6 +82,8 @@ class GLManager : private GpuControl { |
| base::CommandLine* command_line); |
| void Destroy(); |
| + bool IsInitialized() const { return gles2_implementation() != nullptr; } |
| + |
| void MakeCurrent(); |
| void SetSurface(gfx::GLSurface* surface); |