Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: ui/gl/gl_context.cc

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index b3a119c3bdd546c3221baf046a84a84d004db2d7..a0433a6690844c0ac9be43dbb785242343854ac8 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -10,6 +10,7 @@
#include "base/threading/thread_local.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
@@ -87,6 +88,10 @@ void GLContext::SetCurrent(GLContext* context, GLSurface* surface) {
GLSurface::SetCurrent(surface);
}
+GLStateRestorer* GLContext::GetGLStateRestorer() {
+ return NULL;
+}
+
bool GLContext::WasAllocatedUsingRobustnessExtension() {
return false;
}
@@ -102,4 +107,21 @@ bool GLContext::InitializeExtensionBindings() {
return initialized;
}
+void GLContext::SetupForVirtualization() {
+ if (!virtual_gl_api_) {
+ virtual_gl_api_.reset(new VirtualGLApi());
+ virtual_gl_api_->Initialize(&g_driver_gl, this);
+ }
+}
+
+bool GLContext::MakeVirtuallyCurrent(
+ GLContext* virtual_context, GLSurface* surface) {
+ DCHECK(virtual_gl_api_);
+ return virtual_gl_api_->MakeCurrent(virtual_context, surface);
+}
+
+void GLContext::SetRealGLApi() {
+ SetGLToRealGLApi();
+}
+
} // namespace gfx
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698