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_
11 #include "base/compiler_specific.h"
12 #include "gl_bindings.h"
13 #include "ui/gl/gl_export.h"
21 struct GLWindowSystemBindingInfo
;
23 void InitializeStaticGLBindingsEGL();
24 void InitializeDebugGLBindingsEGL();
25 void ClearGLBindingsEGL();
26 bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo
* info
);
28 class GL_EXPORT EGLApiBase
: public EGLApi
{
30 // Include the auto-generated part of this class. We split this because
31 // it means we can easily edit the non-auto generated parts right here in
32 // this file instead of having to edit some template or the code generator.
33 #include "gl_bindings_api_autogen_egl.h"
37 ~EGLApiBase() override
;
38 void InitializeBase(DriverEGL
* driver
);
43 class GL_EXPORT RealEGLApi
: public EGLApiBase
{
46 ~RealEGLApi() override
;
47 void Initialize(DriverEGL
* driver
);
48 void InitializeWithCommandLine(DriverEGL
* driver
,
49 base::CommandLine
* command_line
);
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::map
<EGLDisplay
, 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_