| 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_GL_API_IMPLEMENTATION_H_ | 5 #ifndef UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ | 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/gl/gl_bindings.h" | 9 #include "ui/gl/gl_bindings.h" |
| 10 #include "ui/gl/gl_export.h" | 10 #include "ui/gl/gl_export.h" |
| 11 | 11 |
| 12 namespace base { |
| 13 class CommandLine; |
| 14 } |
| 15 |
| 12 namespace gpu { | 16 namespace gpu { |
| 13 namespace gles2 { | 17 namespace gles2 { |
| 14 class GLES2Decoder; | 18 class GLES2Decoder; |
| 15 } | 19 } |
| 16 } | 20 } |
| 17 namespace gfx { | 21 namespace gfx { |
| 18 | 22 |
| 19 class GLContext; | 23 class GLContext; |
| 20 class GLSurface; | 24 class GLSurface; |
| 21 struct GLVersionInfo; | 25 struct GLVersionInfo; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 44 GLApiBase(); | 48 GLApiBase(); |
| 45 ~GLApiBase() override; | 49 ~GLApiBase() override; |
| 46 void InitializeBase(DriverGL* driver); | 50 void InitializeBase(DriverGL* driver); |
| 47 | 51 |
| 48 DriverGL* driver_; | 52 DriverGL* driver_; |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 // Implemenents the GL API by calling directly into the driver. | 55 // Implemenents the GL API by calling directly into the driver. |
| 52 class RealGLApi : public GLApiBase { | 56 class RealGLApi : public GLApiBase { |
| 53 public: | 57 public: |
| 54 RealGLApi(); | 58 GL_EXPORT RealGLApi(); |
| 55 ~RealGLApi() override; | 59 GL_EXPORT ~RealGLApi() override; |
| 56 void Initialize(DriverGL* driver); | 60 GL_EXPORT void Initialize(DriverGL* driver, base::CommandLine* command_line); |
| 57 | 61 |
| 58 private: | 62 private: |
| 59 void glFinishFn() override; | 63 void glFinishFn() override; |
| 60 void glFlushFn() override; | 64 void glFlushFn() override; |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 // Inserts a TRACE for every GL call. | 67 // Inserts a TRACE for every GL call. |
| 64 class TraceGLApi : public GLApi { | 68 class TraceGLApi : public GLApi { |
| 65 public: | 69 public: |
| 66 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { } | 70 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ScopedSetGLToRealGLApi(); | 126 ScopedSetGLToRealGLApi(); |
| 123 ~ScopedSetGLToRealGLApi(); | 127 ~ScopedSetGLToRealGLApi(); |
| 124 | 128 |
| 125 private: | 129 private: |
| 126 GLApi* old_gl_api_; | 130 GLApi* old_gl_api_; |
| 127 }; | 131 }; |
| 128 | 132 |
| 129 } // namespace gfx | 133 } // namespace gfx |
| 130 | 134 |
| 131 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ | 135 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| OLD | NEW |