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_OSMESA_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_
8 #include "base/compiler_specific.h"
9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_export.h"
16 void InitializeStaticGLBindingsOSMESA();
17 void InitializeDebugGLBindingsOSMESA();
18 void ClearGLBindingsOSMESA();
20 class GL_EXPORT OSMESAApiBase
: public OSMESAApi
{
22 // Include the auto-generated part of this class. We split this because
23 // it means we can easily edit the non-auto generated parts right here in
24 // this file instead of having to edit some template or the code generator.
25 #include "gl_bindings_api_autogen_osmesa.h"
29 ~OSMESAApiBase() override
;
30 void InitializeBase(DriverOSMESA
* driver
);
32 DriverOSMESA
* driver_
;
35 class GL_EXPORT RealOSMESAApi
: public OSMESAApiBase
{
38 ~RealOSMESAApi() override
;
39 void Initialize(DriverOSMESA
* driver
);
42 // Inserts a TRACE for every OSMESA call.
43 class GL_EXPORT TraceOSMESAApi
: public OSMESAApi
{
45 TraceOSMESAApi(OSMESAApi
* osmesa_api
) : osmesa_api_(osmesa_api
) { }
46 ~TraceOSMESAApi() override
;
48 // Include the auto-generated part of this class. We split this because
49 // it means we can easily edit the non-auto generated parts right here in
50 // this file instead of having to edit some template or the code generator.
51 #include "gl_bindings_api_autogen_osmesa.h"
54 OSMESAApi
* osmesa_api_
;
59 #endif // UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_