Chromium Code Reviews| 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 const std::vector<std::string>& DisabledExtensions() { | |
| 54 return disabled_exts_; | |
|
David Yen
2015/06/23 16:38:50
By returning filtered_exts_ instead, we could prob
| |
| 55 } | |
| 56 | |
| 53 private: | 57 private: |
| 54 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls. | 58 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls. |
| 55 std::vector<std::string> disabled_exts_; | 59 std::vector<std::string> disabled_exts_; |
| 56 std::string filtered_exts_; | 60 std::string filtered_exts_; |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 | 63 |
| 60 // Inserts a TRACE for every EGL call. | 64 // Inserts a TRACE for every EGL call. |
| 61 class GL_EXPORT TraceEGLApi : public EGLApi { | 65 class GL_EXPORT TraceEGLApi : public EGLApi { |
| 62 public: | 66 public: |
| 63 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } | 67 TraceEGLApi(EGLApi* egl_api) : egl_api_(egl_api) { } |
| 64 ~TraceEGLApi() override; | 68 ~TraceEGLApi() override; |
| 65 | 69 |
| 66 // Include the auto-generated part of this class. We split this because | 70 // 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 | 71 // 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. | 72 // this file instead of having to edit some template or the code generator. |
| 69 #include "gl_bindings_api_autogen_egl.h" | 73 #include "gl_bindings_api_autogen_egl.h" |
| 70 | 74 |
| 71 private: | 75 private: |
| 72 EGLApi* egl_api_; | 76 EGLApi* egl_api_; |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 } // namespace gfx | 79 } // namespace gfx |
| 76 | 80 |
| 77 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ | 81 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_ |
| 78 | 82 |
| 79 | 83 |
| 80 | 84 |
| OLD | NEW |