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

Side by Side Diff: ui/gl/gl_implementation_x11.cc

Issue 1151093006: Added disabling EGL extensions support with --disable-extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some strange formatting Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "ui/gl/gl_bindings.h" 10 #include "ui/gl/gl_bindings.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return false; 143 return false;
144 } 144 }
145 145
146 146
147 return true; 147 return true;
148 } 148 }
149 149
150 bool InitializeDynamicGLBindings(GLImplementation implementation, 150 bool InitializeDynamicGLBindings(GLImplementation implementation,
151 GLContext* context) { 151 GLContext* context) {
152 switch (implementation) { 152 switch (implementation) {
153 case kGLImplementationEGLGLES2:
154 InitializeDynamicGLBindingsEGL(context);
155 // Intentionally fall through to also initialize Dynamic GL Bindings.
153 case kGLImplementationOSMesaGL: 156 case kGLImplementationOSMesaGL:
154 case kGLImplementationDesktopGL: 157 case kGLImplementationDesktopGL:
155 case kGLImplementationEGLGLES2:
156 InitializeDynamicGLBindingsGL(context); 158 InitializeDynamicGLBindingsGL(context);
157 break; 159 break;
158 case kGLImplementationMockGL: 160 case kGLImplementationMockGL:
159 if (!context) { 161 if (!context) {
160 scoped_refptr<GLContextStubWithExtensions> mock_context( 162 scoped_refptr<GLContextStubWithExtensions> mock_context(
161 new GLContextStubWithExtensions()); 163 new GLContextStubWithExtensions());
162 mock_context->SetGLVersionString("3.0"); 164 mock_context->SetGLVersionString("3.0");
163 InitializeDynamicGLBindingsGL(mock_context.get()); 165 InitializeDynamicGLBindingsGL(mock_context.get());
164 } else 166 } else
165 InitializeDynamicGLBindingsGL(context); 167 InitializeDynamicGLBindingsGL(context);
(...skipping 28 matching lines...) Expand all
194 return GetGLWindowSystemBindingInfoGLX(info); 196 return GetGLWindowSystemBindingInfoGLX(info);
195 case kGLImplementationEGLGLES2: 197 case kGLImplementationEGLGLES2:
196 return GetGLWindowSystemBindingInfoEGL(info); 198 return GetGLWindowSystemBindingInfoEGL(info);
197 default: 199 default:
198 return false; 200 return false;
199 } 201 }
200 return false; 202 return false;
201 } 203 }
202 204
203 } // namespace gfx 205 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698