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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.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_ozone.cc ('k') | ui/gl/gl_implementation_x11.cc » ('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/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/trace_event.h"
12 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
13 #include "base/logging.h" 12 #include "base/logging.h"
14 #include "base/native_library.h" 13 #include "base/native_library.h"
15 #include "base/path_service.h" 14 #include "base/path_service.h"
16 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
17 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
17 #include "base/trace_event/trace_event.h"
18 #include "base/win/windows_version.h" 18 #include "base/win/windows_version.h"
19 #include "ui/gl/gl_bindings.h" 19 #include "ui/gl/gl_bindings.h"
20 #include "ui/gl/gl_context_stub_with_extensions.h" 20 #include "ui/gl/gl_context_stub_with_extensions.h"
21 #include "ui/gl/gl_egl_api_implementation.h" 21 #include "ui/gl/gl_egl_api_implementation.h"
22 #include "ui/gl/gl_gl_api_implementation.h" 22 #include "ui/gl/gl_gl_api_implementation.h"
23 #include "ui/gl/gl_implementation.h" 23 #include "ui/gl/gl_implementation.h"
24 #include "ui/gl/gl_osmesa_api_implementation.h" 24 #include "ui/gl/gl_osmesa_api_implementation.h"
25 #include "ui/gl/gl_surface_wgl.h" 25 #include "ui/gl/gl_surface_wgl.h"
26 #include "ui/gl/gl_wgl_api_implementation.h" 26 #include "ui/gl/gl_wgl_api_implementation.h"
27 27
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 return false; 313 return false;
314 } 314 }
315 315
316 return true; 316 return true;
317 } 317 }
318 318
319 bool InitializeDynamicGLBindings(GLImplementation implementation, 319 bool InitializeDynamicGLBindings(GLImplementation implementation,
320 GLContext* context) { 320 GLContext* context) {
321 switch (implementation) { 321 switch (implementation) {
322 case kGLImplementationOSMesaGL: 322 case kGLImplementationOSMesaGL:
323 InitializeDynamicGLBindingsGL(context);
324 InitializeDynamicGLBindingsOSMESA(context);
325 break;
326 case kGLImplementationEGLGLES2: 323 case kGLImplementationEGLGLES2:
327 InitializeDynamicGLBindingsGL(context);
328 InitializeDynamicGLBindingsEGL(context);
329 break;
330 case kGLImplementationDesktopGL: 324 case kGLImplementationDesktopGL:
331 InitializeDynamicGLBindingsGL(context); 325 InitializeDynamicGLBindingsGL(context);
332 InitializeDynamicGLBindingsWGL(context);
333 break; 326 break;
334 case kGLImplementationMockGL: 327 case kGLImplementationMockGL:
335 if (!context) { 328 if (!context) {
336 scoped_refptr<GLContextStubWithExtensions> mock_context( 329 scoped_refptr<GLContextStubWithExtensions> mock_context(
337 new GLContextStubWithExtensions()); 330 new GLContextStubWithExtensions());
338 mock_context->SetGLVersionString("3.0"); 331 mock_context->SetGLVersionString("3.0");
339 InitializeDynamicGLBindingsGL(mock_context.get()); 332 InitializeDynamicGLBindingsGL(mock_context.get());
340 } else 333 } else
341 InitializeDynamicGLBindingsGL(context); 334 InitializeDynamicGLBindingsGL(context);
342 break; 335 break;
(...skipping 25 matching lines...) Expand all
368 case kGLImplementationDesktopGL: 361 case kGLImplementationDesktopGL:
369 return GetGLWindowSystemBindingInfoWGL(info); 362 return GetGLWindowSystemBindingInfoWGL(info);
370 case kGLImplementationEGLGLES2: 363 case kGLImplementationEGLGLES2:
371 return GetGLWindowSystemBindingInfoEGL(info); 364 return GetGLWindowSystemBindingInfoEGL(info);
372 default: 365 default:
373 return false; 366 return false;
374 } 367 }
375 } 368 }
376 369
377 } // namespace gfx 370 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_implementation_ozone.cc ('k') | ui/gl/gl_implementation_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698