wayland: Fix GL extension binding init to work again for use_wayland

BUG=102903
TEST=compile

Change-Id: I39b360c5f982e83a1fad3f68f65cc3e88c31cf2a

[email protected],[email protected],[email protected],[email protected]


Review URL: http://codereview.chromium.org/8601005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111013 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/gl/gl_implementation_linux.cc b/ui/gfx/gl/gl_implementation_linux.cc
index 19d348201..ee225b19d 100644
--- a/ui/gfx/gl/gl_implementation_linux.cc
+++ b/ui/gfx/gl/gl_implementation_linux.cc
@@ -57,9 +57,11 @@
 }  // namespace anonymous
 
 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
-  impls->push_back(kGLImplementationDesktopGL);
-  impls->push_back(kGLImplementationEGLGLES2);
+#if !defined(USE_WAYLAND)
   impls->push_back(kGLImplementationOSMesaGL);
+  impls->push_back(kGLImplementationDesktopGL);
+#endif
+  impls->push_back(kGLImplementationEGLGLES2);
 }
 
 bool InitializeGLBindings(GLImplementation implementation) {
@@ -190,6 +192,7 @@
 bool InitializeGLExtensionBindings(GLImplementation implementation,
     GLContext* context) {
   switch (implementation) {
+#if !defined(USE_WAYLAND)
     case kGLImplementationOSMesaGL:
       InitializeGLExtensionBindingsGL(context);
       InitializeGLExtensionBindingsOSMESA(context);
@@ -198,6 +201,7 @@
       InitializeGLExtensionBindingsGL(context);
       InitializeGLExtensionBindingsGLX(context);
       break;
+#endif
     case kGLImplementationEGLGLES2:
       InitializeGLExtensionBindingsGL(context);
       InitializeGLExtensionBindingsEGL(context);