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"
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";
21 // Enables use of D3D11 when available.
22 const char kEnableD3D11
[] = "enable-d3d11";
24 // Disables use of D3D11.
25 const char kDisableD3D11
[] = "disable-d3d11";
27 // Stop the GPU from synchronizing on the vsync before presenting.
28 const char kDisableGpuVsync
[] = "disable-gpu-vsync";
30 // Turns on GPU logging (debug build only).
31 const char kEnableGPUServiceLogging
[] = "enable-gpu-service-logging";
32 const char kEnableGPUClientLogging
[] = "enable-gpu-client-logging";
34 // Turns on calling TRACE for every GL call.
35 const char kEnableGPUServiceTracing
[] = "enable-gpu-service-tracing";
37 // Select which implementation of GL the GPU process should use. Options are:
38 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac
40 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually
42 // osmesa: The OSMesa software renderer.
43 const char kUseGL
[] = "use-gl";
45 const char kSwiftShaderPath
[] = "swiftshader-path";
47 // Inform Chrome that a GPU context will not be lost in power saving mode,
48 // screen saving mode, etc. Note that this flag does not ensure that a GPU
49 // context will never be lost in any situations, say, a GPU reset.
50 const char kGpuNoContextLost
[] = "gpu-no-context-lost";
52 // Add a delay in milliseconds to the gpu swap buffer completion signal.
53 // Simulates a slow GPU.
54 const char kGpuSwapDelay
[] = "gpu-swap-delay";
56 // Indicates whether the dual GPU switching is supported or not.
57 const char kSupportsDualGpus
[] = "supports-dual-gpus";
59 // Overwrite the default GPU automatic switching behavior to force on
60 // integrated GPU or discrete GPU.
61 const char kGpuSwitching
[] = "gpu-switching";
63 const char kGpuSwitchingOptionNameForceIntegrated
[] = "force_integrated";
64 const char kGpuSwitchingOptionNameForceDiscrete
[] = "force_discrete";
66 // Flag used for Linux tests: for desktop GL bindings, try to load this GL
67 // library first, but fall back to regular library if loading fails.
68 const char kTestGLLib
[] = "test-gl-lib";
70 // Disables GL drawing operations which produce pixel output. With this
71 // the GL output will not be correct but tests will run faster.
72 const char kDisableGLDrawingForTests
[] = "disable-gl-drawing-for-tests";
74 // This is the list of switches passed from this file that are passed from the
75 // GpuProcessHost to the GPU Process. Add your switch to this list if you need
76 // to read it in the GPU process, else don't add it.
77 const char* kGLSwitchesCopiedFromGpuProcessHost
[] = {
81 kEnableGPUServiceLogging
,
82 kEnableGPUServiceTracing
,
85 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches
=
86 arraysize(kGLSwitchesCopiedFromGpuProcessHost
);
88 } // namespace switches