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

Unified Diff: ui/gl/gl_implementation_x11.cc

Issue 1052153002: Use the desktop GL core profile on Linux when ES3 support is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added link to bug in TODO. Created 5 years, 9 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/gl_context_x11.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ui/gl/gl_context_x11.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698