| Index: ui/gl/gl_implementation_x11.cc
|
| diff --git a/ui/gl/gl_implementation_x11.cc b/ui/gl/gl_implementation_x11.cc
|
| index b8a724649f8c0cfe91e10586718d78e7695acd8a..32fd369f6fb9a7a06a3d178abbf0c9584e671dd9 100644
|
| --- a/ui/gl/gl_implementation_x11.cc
|
| +++ b/ui/gl/gl_implementation_x11.cc
|
| @@ -43,6 +43,10 @@ const char kEGLLibraryName[] = "libEGL.so.1";
|
| } // namespace
|
|
|
| void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableUnsafeES3APIs)) {
|
| + impls->push_back(kGLImplementationDesktopGLCoreProfile);
|
| + }
|
| impls->push_back(kGLImplementationDesktopGL);
|
| impls->push_back(kGLImplementationEGLGLES2);
|
| impls->push_back(kGLImplementationOSMesaGL);
|
| @@ -63,7 +67,8 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
|
| switch (implementation) {
|
| case kGLImplementationOSMesaGL:
|
| return InitializeStaticGLBindingsOSMesaGL();
|
| - case kGLImplementationDesktopGL: {
|
| + case kGLImplementationDesktopGL:
|
| + case kGLImplementationDesktopGLCoreProfile: {
|
| base::NativeLibrary library = NULL;
|
| const base::CommandLine* command_line =
|
| base::CommandLine::ForCurrentProcess();
|
| @@ -91,7 +96,7 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
|
|
|
| SetGLGetProcAddressProc(get_proc_address);
|
| AddGLNativeLibrary(library);
|
| - SetGLImplementation(kGLImplementationDesktopGL);
|
| + SetGLImplementation(implementation);
|
|
|
| InitializeStaticGLBindingsGL();
|
| InitializeStaticGLBindingsGLX();
|
| @@ -151,7 +156,8 @@ bool InitializeDynamicGLBindings(GLImplementation implementation,
|
| GLContext* context) {
|
| switch (implementation) {
|
| case kGLImplementationOSMesaGL:
|
| - case kGLImplementationDesktopGL:
|
| + case kGLImplementationDesktopGL:
|
| + case kGLImplementationDesktopGLCoreProfile:
|
| case kGLImplementationEGLGLES2:
|
| InitializeDynamicGLBindingsGL(context);
|
| break;
|
| @@ -191,6 +197,7 @@ void ClearGLBindings() {
|
| bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
|
| switch (GetGLImplementation()) {
|
| case kGLImplementationDesktopGL:
|
| + case kGLImplementationDesktopGLCoreProfile:
|
| return GetGLWindowSystemBindingInfoGLX(info);
|
| case kGLImplementationEGLGLES2:
|
| return GetGLWindowSystemBindingInfoEGL(info);
|
|
|