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_glx_api_implementation.cc b/ui/gl/gl_glx_api_implementation.cc
index 8989756..dc145ad9b 100644
--- a/ui/gl/gl_glx_api_implementation.cc
+++ b/ui/gl/gl_glx_api_implementation.cc
@@ -40,6 +40,17 @@
GLXApi::~GLXApi() {
}
+GLXApiBase::GLXApiBase()
+ : driver_(NULL) {
+}
+
+GLXApiBase::~GLXApiBase() {
+}
+
+void GLXApiBase::InitializeBase(DriverGLX* driver) {
+ driver_ = driver;
+}
+
RealGLXApi::RealGLXApi() {
}
@@ -47,7 +58,7 @@
}
void RealGLXApi::Initialize(DriverGLX* driver) {
- driver_ = driver;
+ InitializeBase(driver);
}
} // namespace gfx