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_GLX_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_GLX_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 InitializeStaticGLBindingsGLX();
23 void InitializeDebugGLBindingsGLX();
24 void ClearGLBindingsGLX();
25 bool GetGLWindowSystemBindingInfoGLX(GLWindowSystemBindingInfo
* info
);
27 class GL_EXPORT GLXApiBase
: public GLXApi
{
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_glx.h"
36 ~GLXApiBase() override
;
37 void InitializeBase(DriverGLX
* driver
);
42 class GL_EXPORT RealGLXApi
: public GLXApiBase
{
45 ~RealGLXApi() override
;
46 void Initialize(DriverGLX
* driver
);
47 void InitializeWithCommandLine(DriverGLX
* driver
,
48 base::CommandLine
* command_line
);
50 const char* glXQueryExtensionsStringFn(Display
* dpy
, int screen
) override
;
53 std::vector
<std::string
> disabled_exts_
;
54 std::string filtered_exts_
;
57 // Inserts a TRACE for every GLX call.
58 class GL_EXPORT TraceGLXApi
: public GLXApi
{
60 TraceGLXApi(GLXApi
* glx_api
) : glx_api_(glx_api
) { }
61 ~TraceGLXApi() override
;
63 // Include the auto-generated part of this class. We split this because
64 // it means we can easily edit the non-auto generated parts right here in
65 // this file instead of having to edit some template or the code generator.
66 #include "gl_bindings_api_autogen_glx.h"
74 #endif // UI_GL_GL_GLX_API_IMPLEMENTATION_H_