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_EGL_API_IMPLEMENTATION_H_ | 5 #ifndef UI_GL_GL_EGL_API_IMPLEMENTATION_H_ |
6 #define UI_GL_GL_EGL_API_IMPLEMENTATION_H_ | 6 #define UI_GL_GL_EGL_API_IMPLEMENTATION_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "gl_bindings.h" | 11 #include "gl_bindings.h" |
10 #include "ui/gl/gl_export.h" | 12 #include "ui/gl/gl_export.h" |
11 | 13 |
| 14 namespace base { |
| 15 class CommandLine; |
| 16 } |
12 namespace gfx { | 17 namespace gfx { |
13 | 18 |
14 class GLContext; | 19 class GLContext; |
15 struct GLWindowSystemBindingInfo; | 20 struct GLWindowSystemBindingInfo; |
16 | 21 |
17 void InitializeStaticGLBindingsEGL(); | 22 void InitializeStaticGLBindingsEGL(); |
18 void InitializeDebugGLBindingsEGL(); | 23 void InitializeDebugGLBindingsEGL(); |
19 void ClearGLBindingsEGL(); | 24 void ClearGLBindingsEGL(); |
20 bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo* info); | 25 bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo* info); |
21 | 26 |
(...skipping 10 matching lines...) Expand all Loading... |
32 void InitializeBase(DriverEGL* driver); | 37 void InitializeBase(DriverEGL* driver); |
33 | 38 |
34 DriverEGL* driver_; | 39 DriverEGL* driver_; |
35 }; | 40 }; |
36 | 41 |
37 class GL_EXPORT RealEGLApi : public EGLApiBase { | 42 class GL_EXPORT RealEGLApi : public EGLApiBase { |
38 public: | 43 public: |
39 RealEGLApi(); | 44 RealEGLApi(); |
40 ~RealEGLApi() override; | 45 ~RealEGLApi() override; |
41 void Initialize(DriverEGL* driver); | 46 void Initialize(DriverEGL* driver); |
| 47 void InitializeWithCommandLine(DriverEGL* driver, |
| 48 base::CommandLine* command_line); |
| 49 void InitializeFilteredExtensions(); |
| 50 |
| 51 const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) override; |
| 52 |
| 53 private: |
| 54 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls. |
| 55 std::vector<std::string> disabled_exts_; |
| 56 std::string filtered_exts_; |
42 }; | 57 }; |
43 | 58 |
44 | 59 |
45 // Inserts a TRACE for every EGL call. | 60 // Inserts a TRACE for every EGL call. |
46 class GL_EXPORT TraceEGLApi : public EGLApi { | 61 class GL_EXPORT TraceEGLApi : public EGLApi { |
47 public: | 62 public: |
48 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } | 63 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } |
49 ~TraceEGLApi() override; | 64 ~TraceEGLApi() override; |
50 | 65 |
51 // Include the auto-generated part of this class. We split this because | 66 // Include the auto-generated part of this class. We split this because |
52 // it means we can easily edit the non-auto generated parts right here in | 67 // it means we can easily edit the non-auto generated parts right here in |
53 // this file instead of having to edit some template or the code generator. | 68 // this file instead of having to edit some template or the code generator. |
54 #include "gl_bindings_api_autogen_egl.h" | 69 #include "gl_bindings_api_autogen_egl.h" |
55 | 70 |
56 private: | 71 private: |
57 EGLApi* egl_api_; | 72 EGLApi* egl_api_; |
58 }; | 73 }; |
59 | 74 |
60 } // namespace gfx | 75 } // namespace gfx |
61 | 76 |
62 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ | 77 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ |
63 | 78 |
64 | 79 |
65 | 80 |
OLD | NEW |