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) { |