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

Unified Diff: ui/gl/gl_share_group.cc

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)
Patch Set: Fix various tests Created 4 years, 3 months 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
Index: ui/gl/gl_share_group.cc
diff --git a/ui/gl/gl_share_group.cc b/ui/gl/gl_share_group.cc
index 82fc7594f4dd4ff0090593312e133e3b2837b1ef..52f1f24a68ad53f785e03f61433f9a519de4bbdd 100644
--- a/ui/gl/gl_share_group.cc
+++ b/ui/gl/gl_share_group.cc
@@ -7,6 +7,11 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_implementation.h"
+
+#if defined(USE_X11)
+#include "gl_share_group_glx.h"
+#endif
namespace gl {
@@ -47,12 +52,12 @@ GLContext* GLShareGroup::GetContext() {
return NULL;
}
-void GLShareGroup::SetSharedContext(GLContext* context) {
+void GLShareGroup::SetSharedContext(GLSurface* compatible, GLContext* context) {
DCHECK(contexts_.find(context) != contexts_.end());
shared_context_ = context;
}
-GLContext* GLShareGroup::GetSharedContext() {
+GLContext* GLShareGroup::GetSharedContext(GLSurface* compatible) {
return shared_context_;
}
@@ -69,4 +74,12 @@ int GLShareGroup::GetRendererID() {
GLShareGroup::~GLShareGroup() {
}
+GLShareGroup* CreateGLShareGroup() {
+#if defined(USE_X11)
+ if (GetGLImplementation() == kGLImplementationDesktopGL)
+ return new GLShareGroupGLX();
+#endif
+ return new GLShareGroup();
+}
+
} // namespace gl

Powered by Google App Engine
This is Rietveld 408576698