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

Unified Diff: ui/gl/init/gl_factory_x11.cc

Issue 2189233003: Move last of platform dependent init from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix return values. Created 4 years, 5 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
« no previous file with comments | « ui/gl/init/gl_factory_win.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_x11.cc
diff --git a/ui/gl/init/gl_factory_x11.cc b/ui/gl/init/gl_factory_x11.cc
index 21b07def7e8467c038190437a27b2f9c019bde8f..588320e1ffded537155bc1d106136e29399c2a12 100644
--- a/ui/gl/init/gl_factory_x11.cc
+++ b/ui/gl/init/gl_factory_x11.cc
@@ -10,6 +10,8 @@
#include "ui/gl/gl_context_glx.h"
#include "ui/gl/gl_context_osmesa.h"
#include "ui/gl/gl_context_stub.h"
+#include "ui/gl/gl_egl_api_implementation.h"
+#include "ui/gl/gl_glx_api_implementation.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_share_group.h"
#include "ui/gl/gl_surface.h"
@@ -23,6 +25,25 @@
namespace gl {
namespace init {
+std::vector<GLImplementation> GetAllowedGLImplementations() {
+ std::vector<GLImplementation> impls;
+ impls.push_back(kGLImplementationDesktopGL);
+ impls.push_back(kGLImplementationEGLGLES2);
+ impls.push_back(kGLImplementationOSMesaGL);
+ return impls;
+}
+
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationDesktopGL:
+ return GetGLWindowSystemBindingInfoGLX(info);
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+}
+
scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
GLSurface* compatible_surface,
GpuPreference gpu_preference) {
« no previous file with comments | « ui/gl/init/gl_factory_win.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698