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

Unified Diff: ui/gl/init/gl_factory_mac.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_android.cc ('k') | ui/gl/init/gl_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_mac.cc
diff --git a/ui/gl/init/gl_factory_mac.cc b/ui/gl/init/gl_factory_mac.cc
index 6b8fffa0440cb80db4fb21957a9f312334b4c39e..faca605f29b3f2eed623b906c887d917cee80154 100644
--- a/ui/gl/init/gl_factory_mac.cc
+++ b/ui/gl/init/gl_factory_mac.cc
@@ -4,6 +4,7 @@
#include "ui/gl/init/gl_factory.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/trace_event/trace_event.h"
@@ -16,6 +17,7 @@
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_surface_osmesa.h"
#include "ui/gl/gl_surface_stub.h"
+#include "ui/gl/gl_switches.h"
namespace gl {
namespace init {
@@ -54,6 +56,22 @@ class NoOpGLSurface : public GLSurface {
} // namespace
+std::vector<GLImplementation> GetAllowedGLImplementations() {
+ std::vector<GLImplementation> impls;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableUnsafeES3APIs)) {
+ impls.push_back(kGLImplementationDesktopGLCoreProfile);
+ }
+ impls.push_back(kGLImplementationDesktopGL);
+ impls.push_back(kGLImplementationAppleGL);
+ impls.push_back(kGLImplementationOSMesaGL);
+ return impls;
+}
+
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ 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_android.cc ('k') | ui/gl/init/gl_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698