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

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

Issue 893213002: Revert of Make GL bindings conditional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « ui/gl/gl_implementation_win.cc ('k') | ui/gl/gl_osmesa_api_implementation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kGLImplementationOSMesaGL: 153 case kGLImplementationOSMesaGL:
154 case kGLImplementationDesktopGL: 154 InitializeDynamicGLBindingsGL(context);
155 InitializeDynamicGLBindingsOSMESA(context);
156 break;
157 case kGLImplementationDesktopGL:
158 InitializeDynamicGLBindingsGL(context);
159 InitializeDynamicGLBindingsGLX(context);
160 break;
155 case kGLImplementationEGLGLES2: 161 case kGLImplementationEGLGLES2:
156 InitializeDynamicGLBindingsGL(context); 162 InitializeDynamicGLBindingsGL(context);
163 InitializeDynamicGLBindingsEGL(context);
157 break; 164 break;
158 case kGLImplementationMockGL: 165 case kGLImplementationMockGL:
159 if (!context) { 166 if (!context) {
160 scoped_refptr<GLContextStubWithExtensions> mock_context( 167 scoped_refptr<GLContextStubWithExtensions> mock_context(
161 new GLContextStubWithExtensions()); 168 new GLContextStubWithExtensions());
162 mock_context->SetGLVersionString("3.0"); 169 mock_context->SetGLVersionString("3.0");
163 InitializeDynamicGLBindingsGL(mock_context.get()); 170 InitializeDynamicGLBindingsGL(mock_context.get());
164 } else 171 } else
165 InitializeDynamicGLBindingsGL(context); 172 InitializeDynamicGLBindingsGL(context);
166 break; 173 break;
(...skipping 27 matching lines...) Expand all
194 return GetGLWindowSystemBindingInfoGLX(info); 201 return GetGLWindowSystemBindingInfoGLX(info);
195 case kGLImplementationEGLGLES2: 202 case kGLImplementationEGLGLES2:
196 return GetGLWindowSystemBindingInfoEGL(info); 203 return GetGLWindowSystemBindingInfoEGL(info);
197 default: 204 default:
198 return false; 205 return false;
199 } 206 }
200 return false; 207 return false;
201 } 208 }
202 209
203 } // namespace gfx 210 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_implementation_win.cc ('k') | ui/gl/gl_osmesa_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698