summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_gl_api_implementation.cc
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 17:21:38 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 17:21:38 +0000
commitb97c908631bf84857264bf9b61433aebed0d0256 (patch)
tree0b9b078768db8e47a716dc2d609e72d1ca992d11 /ui/gl/gl_gl_api_implementation.cc
parent5bcd97cb25b1d8a8f9ec9d190ef762607b81721f (diff)
downloadchromium_src-b97c908631bf84857264bf9b61433aebed0d0256.zip
chromium_src-b97c908631bf84857264bf9b61433aebed0d0256.tar.gz
chromium_src-b97c908631bf84857264bf9b61433aebed0d0256.tar.bz2
Revert "Revert 164047 - Make GL calls go through subclassable class."
This reverts commit 25afcfe213ffd88f8e9370d4ff1ee23ecf9ae16c. BUG=155557 TBR=apatrick@chromium.org Review URL: https://codereview.chromium.org/11264041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_gl_api_implementation.cc')
-rw-r--r--ui/gl/gl_gl_api_implementation.cc52
1 files changed, 52 insertions, 0 deletions
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
new file mode 100644
index 0000000..0a6bf8c
--- /dev/null
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gl/gl_gl_api_implementation.h"
+
+namespace gfx {
+
+RealGLApi* g_real_gl;
+
+void InitializeGLBindingsGL() {
+ g_driver_gl.InitializeBindings();
+ if (!g_real_gl) {
+ g_real_gl = new RealGLApi();
+ }
+ g_real_gl->Initialize(&g_driver_gl);
+ g_current_gl_context = g_real_gl;
+}
+
+void InitializeGLExtensionBindingsGL(GLContext* context) {
+ g_driver_gl.InitializeExtensionBindings(context);
+}
+
+void InitializeDebugGLBindingsGL() {
+ g_driver_gl.InitializeDebugBindings();
+}
+
+void ClearGLBindingsGL() {
+ if (g_real_gl) {
+ delete g_real_gl;
+ g_real_gl = NULL;
+ }
+ g_current_gl_context = NULL;
+ g_driver_gl.ClearBindings();
+}
+
+GLApi::GLApi() {
+}
+
+GLApi::~GLApi() {
+}
+
+RealGLApi::RealGLApi() {
+}
+
+void RealGLApi::Initialize(DriverGL* driver) {
+ driver_ = driver;
+}
+
+} // namespace gfx
+
+