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