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
3 // found in the LICENSE file.
5 #ifndef UI_GL_GL_EGL_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_EGL_API_IMPLEMENTATION_H_
10 #include "base/compiler_specific.h"
11 #include "gl_bindings.h"
12 #include "ui/gl/gl_export.h"
20 struct GLWindowSystemBindingInfo
;
22 void InitializeStaticGLBindingsEGL();
23 void InitializeDebugGLBindingsEGL();
24 void ClearGLBindingsEGL();
25 bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo
* info
);
27 class GL_EXPORT EGLApiBase
: public EGLApi
{
29 // Include the auto-generated part of this class. We split this because
30 // it means we can easily edit the non-auto generated parts right here in
31 // this file instead of having to edit some template or the code generator.
32 #include "gl_bindings_api_autogen_egl.h"
36 ~EGLApiBase() override
;
37 void InitializeBase(DriverEGL
* driver
);
42 class GL_EXPORT RealEGLApi
: public EGLApiBase
{
45 ~RealEGLApi() override
;
46 void Initialize(DriverEGL
* driver
);
47 void InitializeWithCommandLine(DriverEGL
* driver
,
48 base::CommandLine
* command_line
);
49 void InitializeFilteredExtensions();
51 const char* eglQueryStringFn(EGLDisplay dpy
, EGLint name
) override
;
54 // Filtered EGL_EXTENSIONS we return to eglQueryStringFn() calls.
55 std::vector
<std::string
> disabled_exts_
;
56 std::string filtered_exts_
;
60 // Inserts a TRACE for every EGL call.
61 class GL_EXPORT TraceEGLApi
: public EGLApi
{
63 TraceEGLApi(EGLApi
* egl_api
) : egl_api_(egl_api
) { }
64 ~TraceEGLApi() override
;
66 // 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
68 // this file instead of having to edit some template or the code generator.
69 #include "gl_bindings_api_autogen_egl.h"
77 #endif // UI_GL_GL_EGL_API_IMPLEMENTATION_H_