Make most of VirtualGL auto-generated
I'm not sure if this is the best way
GLApi is a pure virtual interface
GLApiBase is a class that calls driver->fnGLfunction
so it can be shared with RealGLApi and VirtualGLApi
RealGLApi is basically has nothing currenlty. It's just
GLApiBase but I guess the point is you can override something
if you need to
VirtualGLApi can now override just what it needs to so adding
new functions to generate_bindings.py no longer needs manual
editing
BUG=none
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11565005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173364 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gl/gl_wgl_api_implementation.h b/ui/gl/gl_wgl_api_implementation.h
index 2b7a09a..8af846c 100644
--- a/ui/gl/gl_wgl_api_implementation.h
+++ b/ui/gl/gl_wgl_api_implementation.h
@@ -18,21 +18,28 @@
void InitializeDebugGLBindingsWGL();
void ClearGLBindingsWGL();
-class GL_EXPORT RealWGLApi : public WGLApi {
+class GL_EXPORT WGLApiBase : public WGLApi {
public:
- RealWGLApi();
- virtual ~RealWGLApi();
- void Initialize(DriverWGL* driver);
-
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
// this file instead of having to edit some template or the code generator.
#include "gl_bindings_api_autogen_wgl.h"
- private:
+ protected:
+ WGLApiBase();
+ virtual ~WGLApiBase();
+ void InitializeBase(DriverWGL* driver);
+
DriverWGL* driver_;
};
+class GL_EXPORT RealWGLApi : public WGLApiBase {
+ public:
+ RealWGLApi();
+ virtual ~RealWGLApi();
+ void Initialize(DriverWGL* driver);
+};
+
} // namespace gfx
#endif // UI_GL_WGL_API_IMPLEMENTATION_H_