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_WGL_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_WGL_API_IMPLEMENTATION_H_
10 #include "base/compiler_specific.h"
11 #include "ui/gl/gl_bindings.h"
12 #include "ui/gl/gl_export.h"
20 struct GLWindowSystemBindingInfo
;
22 void InitializeStaticGLBindingsWGL();
23 void InitializeDebugGLBindingsWGL();
24 void ClearGLBindingsWGL();
25 bool GetGLWindowSystemBindingInfoWGL(GLWindowSystemBindingInfo
* info
);
27 class GL_EXPORT WGLApiBase
: public WGLApi
{
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_wgl.h"
36 ~WGLApiBase() override
;
37 void InitializeBase(DriverWGL
* driver
);
42 class GL_EXPORT RealWGLApi
: public WGLApiBase
{
45 ~RealWGLApi() override
;
46 void Initialize(DriverWGL
* driver
);
47 void InitializeWithCommandLine(DriverWGL
* driver
,
48 base::CommandLine
* command_line
);
50 const char* wglGetExtensionsStringARBFn(HDC hDC
) override
;
51 const char* wglGetExtensionsStringEXTFn() override
;
54 std::vector
<std::string
> disabled_exts_
;
55 std::string filtered_arb_exts_
;
56 std::string filtered_ext_exts_
;
59 // Inserts a TRACE for every WGL call.
60 class GL_EXPORT TraceWGLApi
: public WGLApi
{
62 TraceWGLApi(WGLApi
* wgl_api
) : wgl_api_(wgl_api
) { }
63 ~TraceWGLApi() override
;
65 // Include the auto-generated part of this class. We split this because
66 // it means we can easily edit the non-auto generated parts right here in
67 // this file instead of having to edit some template or the code generator.
68 #include "gl_bindings_api_autogen_wgl.h"
76 #endif // UI_GL_GL_WGL_API_IMPLEMENTATION_H_