Remove chromeos==0 blacklist for test_isolation_mode.
[chromium-blink-merge.git] / ui / gl / gl_switches.cc
blob4ac132843d4621d223ffe0e9a21e906aa3015142
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
3 // found in the LICENSE file.
5 #include "ui/gl/gl_switches.h"
6 #include "base/basictypes.h"
8 namespace gfx {
10 const char kGLImplementationDesktopName[] = "desktop";
11 const char kGLImplementationOSMesaName[] = "osmesa";
12 const char kGLImplementationAppleName[] = "apple";
13 const char kGLImplementationEGLName[] = "egl";
14 const char kGLImplementationSwiftShaderName[] = "swiftshader";
15 const char kGLImplementationMockName[] = "mock";
17 const char kANGLEImplementationDefaultName[] = "default";
18 const char kANGLEImplementationD3D9Name[] = "d3d9";
19 const char kANGLEImplementationD3D11Name[] = "d3d11";
20 const char kANGLEImplementationWARPName[] = "warp";
21 const char kANGLEImplementationOpenGLName[] = "gl";
22 const char kANGLEImplementationOpenGLESName[] = "gles";
24 } // namespace gfx
26 namespace switches {
28 // Disables use of D3D11.
29 const char kDisableD3D11[] = "disable-d3d11";
31 // Stop the GPU from synchronizing on the vsync before presenting.
32 const char kDisableGpuVsync[] = "disable-gpu-vsync";
34 // Turns on GPU logging (debug build only).
35 const char kEnableGPUServiceLogging[] = "enable-gpu-service-logging";
37 // Turns on calling TRACE for every GL call.
38 const char kEnableGPUServiceTracing[] = "enable-gpu-service-tracing";
40 // Select which ANGLE backend to use. Options are:
41 // default: Attempts several ANGLE renderers until one successfully
42 // initializes, varying ES support by platform.
43 // d3d9: Legacy D3D9 renderer, ES2 only.
44 // d3d11: D3D11 renderer, ES2 and ES3.
45 // warp: D3D11 renderer using software rasterization, ES2 and ES3.
46 // gl: Desktop GL renderer, ES2 and ES3.
47 // gles: GLES renderer, ES2 and ES3.
48 const char kUseANGLE[] = "use-angle";
50 // Select which implementation of GL the GPU process should use. Options are:
51 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac
52 // default).
53 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually
54 // ANGLE).
55 // osmesa: The OSMesa software renderer.
56 const char kUseGL[] = "use-gl";
58 const char kSwiftShaderPath[] = "swiftshader-path";
60 // Inform Chrome that a GPU context will not be lost in power saving mode,
61 // screen saving mode, etc. Note that this flag does not ensure that a GPU
62 // context will never be lost in any situations, say, a GPU reset.
63 const char kGpuNoContextLost[] = "gpu-no-context-lost";
65 // Indicates whether the dual GPU switching is supported or not.
66 const char kSupportsDualGpus[] = "supports-dual-gpus";
68 // Flag used for Linux tests: for desktop GL bindings, try to load this GL
69 // library first, but fall back to regular library if loading fails.
70 const char kTestGLLib[] = "test-gl-lib";
72 // Use hardware gpu, if available, for tests.
73 const char kUseGpuInTests[] = "use-gpu-in-tests";
75 // Enable OpenGL ES 3 APIs without proper service side validation.
76 const char kEnableUnsafeES3APIs[] = "enable-unsafe-es3-apis";
78 // Disables GL drawing operations which produce pixel output. With this
79 // the GL output will not be correct but tests will run faster.
80 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests";
82 // Forces the use of OSMesa instead of hardware gpu.
83 const char kOverrideUseGLWithOSMesaForTests[] =
84 "override-use-gl-with-osmesa-for-tests";
86 // Disables specified comma separated GL Extensions if found.
87 const char kDisableGLExtensions[] = "disable-gl-extensions";
89 // This is the list of switches passed from this file that are passed from the
90 // GpuProcessHost to the GPU Process. Add your switch to this list if you need
91 // to read it in the GPU process, else don't add it.
92 const char* kGLSwitchesCopiedFromGpuProcessHost[] = {
93 kDisableGpuVsync,
94 kDisableD3D11,
95 kEnableGPUServiceLogging,
96 kEnableGPUServiceTracing,
97 kEnableUnsafeES3APIs,
98 kGpuNoContextLost,
99 kDisableGLDrawingForTests,
100 kOverrideUseGLWithOSMesaForTests,
101 kUseANGLE,
103 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches =
104 arraysize(kGLSwitchesCopiedFromGpuProcessHost);
106 } // namespace switches