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

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

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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_surface.cc ('k') | ui/gl/gl_surface_win.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 "ui/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #if defined(OS_ANDROID) 7 #if defined(OS_ANDROID)
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #endif 9 #endif
10 10
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 #if defined(OS_WIN) 306 #if defined(OS_WIN)
307 static const EGLint kDisplayAttribsWarp[] { 307 static const EGLint kDisplayAttribsWarp[] {
308 EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 308 EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
309 EGL_PLATFORM_ANGLE_USE_WARP_ANGLE, EGL_TRUE, 309 EGL_PLATFORM_ANGLE_USE_WARP_ANGLE, EGL_TRUE,
310 EGL_NONE 310 EGL_NONE
311 }; 311 };
312 312
313 // static 313 // static
314 EGLDisplay GLSurfaceEGL::GetPlatformDisplay( 314 EGLDisplay GLSurfaceEGL::GetPlatformDisplay(
315 EGLNativeDisplayType native_display) { 315 EGLNativeDisplayType native_display) {
316 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) { 316 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) {
317 // Check for availability of WARP via ANGLE extension. 317 // Check for availability of WARP via ANGLE extension.
318 bool supports_warp = false; 318 bool supports_warp = false;
319 const char* no_display_extensions = eglQueryString(EGL_NO_DISPLAY, 319 const char* no_display_extensions = eglQueryString(EGL_NO_DISPLAY,
320 EGL_EXTENSIONS); 320 EGL_EXTENSIONS);
321 // If EGL_EXT_client_extensions not supported this call to eglQueryString 321 // If EGL_EXT_client_extensions not supported this call to eglQueryString
322 // will return NULL. 322 // will return NULL.
323 if (no_display_extensions) 323 if (no_display_extensions)
324 supports_warp = 324 supports_warp =
325 ExtensionsContain(no_display_extensions, "ANGLE_platform_angle") && 325 ExtensionsContain(no_display_extensions, "ANGLE_platform_angle") &&
326 ExtensionsContain(no_display_extensions, "ANGLE_platform_angle_d3d"); 326 ExtensionsContain(no_display_extensions, "ANGLE_platform_angle_d3d");
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 } 760 }
761 761
762 void* SurfacelessEGL::GetShareHandle() { 762 void* SurfacelessEGL::GetShareHandle() {
763 return NULL; 763 return NULL;
764 } 764 }
765 765
766 SurfacelessEGL::~SurfacelessEGL() { 766 SurfacelessEGL::~SurfacelessEGL() {
767 } 767 }
768 768
769 } // namespace gfx 769 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698