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

Unified Diff: ui/gl/gl_context_ozone.cc

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move refactor to new CL. Created 4 years, 8 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_context_ozone.cc
diff --git a/ui/gl/gl_context_ozone.cc b/ui/gl/gl_context_ozone.cc
index d62b5686b9ed63b0ac5e5a18984dafc0326e905a..2b34585c6b409cf8337fcbb42051286210659863 100644
--- a/ui/gl/gl_context_ozone.cc
+++ b/ui/gl/gl_context_ozone.cc
@@ -14,6 +14,10 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
+#if defined(USE_GLX)
+#include "ui/gl/gl_context_glx.h"
+#endif
+
namespace gfx {
// static
@@ -25,6 +29,14 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(
switch (GetGLImplementation()) {
case kGLImplementationMockGL:
return scoped_refptr<GLContext>(new GLContextStub());
+#if defined(USE_GLX)
rjkroege 2016/04/27 19:08:12 The #ifdef and configuration is unfortunate as it
kylechar 2016/04/27 19:36:32 So, it's definitely possible with one very large r
+ case kGLImplementationDesktopGL: {
+ scoped_refptr<GLContext> context(new GLContextGLX(share_group));
+ if (!context->Initialize(compatible_surface, gpu_preference))
+ return nullptr;
+ return context;
+ }
+#endif
case kGLImplementationOSMesaGL: {
scoped_refptr<GLContext> context(new GLContextOSMesa(share_group));
if (!context->Initialize(compatible_surface, gpu_preference))

Powered by Google App Engine
This is Rietveld 408576698