1. With introduction of compressed formats, e.g. ETC1, the number of
[chromium-blink-merge.git] / ui / gl / gl_osmesa_api_implementation.h
blobc740e1ab8edb07e1923a3ad2d1ed8886a6f1fe36
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"
12 namespace gfx {
14 class GLContext;
16 void InitializeStaticGLBindingsOSMESA();
17 void InitializeDebugGLBindingsOSMESA();
18 void ClearGLBindingsOSMESA();
20 class GL_EXPORT OSMESAApiBase : public OSMESAApi {
21 public:
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"
27 protected:
28 OSMESAApiBase();
29 ~OSMESAApiBase() override;
30 void InitializeBase(DriverOSMESA* driver);
32 DriverOSMESA* driver_;
35 class GL_EXPORT RealOSMESAApi : public OSMESAApiBase {
36 public:
37 RealOSMESAApi();
38 ~RealOSMESAApi() override;
39 void Initialize(DriverOSMESA* driver);
42 // Inserts a TRACE for every OSMESA call.
43 class GL_EXPORT TraceOSMESAApi : public OSMESAApi {
44 public:
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"
53 private:
54 OSMESAApi* osmesa_api_;
57 } // namespace gfx
59 #endif // UI_GL_GL_OSMESA_API_IMPLEMENTATION_H_