| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GL_GL_CONTEXT_STUB_H_ | 5 #ifndef UI_GL_GL_CONTEXT_STUB_H_ |
| 6 #define UI_GL_GL_CONTEXT_STUB_H_ | 6 #define UI_GL_GL_CONTEXT_STUB_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gl/gl_context.h" | 9 #include "ui/gl/gl_context.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 | 12 |
| 13 // A GLContext that does nothing for unit tests. | 13 // A GLContext that does nothing for unit tests. |
| 14 class GL_EXPORT GLContextStub : public GLContextReal { | 14 class GL_EXPORT GLContextStub : public GLContextReal { |
| 15 public: | 15 public: |
| 16 GLContextStub(); | 16 GLContextStub(); |
| 17 | 17 |
| 18 // Implement GLContext. | 18 // Implement GLContext. |
| 19 bool Initialize(GLSurface* compatible_surface, | 19 bool Initialize(GLSurface* compatible_surface, |
| 20 GpuPreference gpu_preference) override; | 20 GpuPreference gpu_preference) override; |
| 21 bool MakeCurrent(GLSurface* surface) override; | 21 bool MakeCurrent(GLSurface* surface) override; |
| 22 void ReleaseCurrent(GLSurface* surface) override; | 22 void ReleaseCurrent(GLSurface* surface) override; |
| 23 bool IsCurrent(GLSurface* surface) override; | 23 bool IsCurrent(GLSurface* surface) override; |
| 24 void* GetHandle() override; | 24 void* GetHandle() override; |
| 25 void OnSetSwapInterval(int interval) override; | 25 void OnSetSwapInterval(int interval) override; |
| 26 std::string GetExtensions() override; | |
| 27 std::string GetGLRenderer() override; | 26 std::string GetGLRenderer() override; |
| 28 | 27 |
| 29 protected: | 28 protected: |
| 30 ~GLContextStub() override; | 29 ~GLContextStub() override; |
| 31 | 30 |
| 32 private: | 31 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(GLContextStub); | 32 DISALLOW_COPY_AND_ASSIGN(GLContextStub); |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace gfx | 35 } // namespace gfx |
| 37 | 36 |
| 38 #endif // UI_GL_GL_CONTEXT_STUB_H_ | 37 #endif // UI_GL_GL_CONTEXT_STUB_H_ |
| OLD | NEW |