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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 base::CommandLine* command_line); | 48 base::CommandLine* command_line); |
49 | 49 |
50 const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) override; | 50 const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) override; |
51 | 51 |
52 private: | 52 private: |
53 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls. | 53 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls. |
54 std::vector<std::string> disabled_exts_; | 54 std::vector<std::string> disabled_exts_; |
55 std::map<EGLDisplay, std::string> filtered_exts_; | 55 std::map<EGLDisplay, std::string> filtered_exts_; |
56 }; | 56 }; |
57 | 57 |
| 58 // Logs debug information for every EGL call. |
| 59 class GL_EXPORT DebugEGLApi : public EGLApi { |
| 60 public: |
| 61 DebugEGLApi(EGLApi* egl_api); |
| 62 ~DebugEGLApi() override; |
| 63 |
| 64 // Include the auto-generated part of this class. We split this because |
| 65 // it means we can easily edit the non-auto generated parts right here in |
| 66 // this file instead of having to edit some template or the code generator. |
| 67 #include "gl_bindings_api_autogen_egl.h" |
| 68 |
| 69 private: |
| 70 EGLApi* egl_api_; |
| 71 }; |
58 | 72 |
59 // Inserts a TRACE for every EGL call. | 73 // Inserts a TRACE for every EGL call. |
60 class GL_EXPORT TraceEGLApi : public EGLApi { | 74 class GL_EXPORT TraceEGLApi : public EGLApi { |
61 public: | 75 public: |
62 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } | 76 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } |
63 ~TraceEGLApi() override; | 77 ~TraceEGLApi() override; |
64 | 78 |
65 // Include the auto-generated part of this class. We split this because | 79 // Include the auto-generated part of this class. We split this because |
66 // it means we can easily edit the non-auto generated parts right here in | 80 // it means we can easily edit the non-auto generated parts right here in |
67 // this file instead of having to edit some template or the code generator. | 81 // this file instead of having to edit some template or the code generator. |
68 #include "gl_bindings_api_autogen_egl.h" | 82 #include "gl_bindings_api_autogen_egl.h" |
69 | 83 |
70 private: | 84 private: |
71 EGLApi* egl_api_; | 85 EGLApi* egl_api_; |
72 }; | 86 }; |
73 | 87 |
74 } // namespace gl | 88 } // namespace gl |
75 | 89 |
76 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ | 90 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ |
77 | 91 |
78 | 92 |
79 | 93 |
OLD | NEW |