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 // Disables use of D3D11.
22 const char kDisableD3D11[] = "disable-d3d11";
24 // Stop the GPU from synchronizing on the vsync before presenting.
25 const char kDisableGpuVsync[] = "disable-gpu-vsync";
27 // Turns on GPU logging (debug build only).
28 const char kEnableGPUServiceLogging[] = "enable-gpu-service-logging";
29 const char kEnableGPUClientLogging[] = "enable-gpu-client-logging";
31 // Turns on calling TRACE for every GL call.
32 const char kEnableGPUServiceTracing[] = "enable-gpu-service-tracing";
34 // Select which implementation of GL the GPU process should use. Options are:
35 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac
37 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually
39 // osmesa: The OSMesa software renderer.
40 const char kUseGL[] = "use-gl";
42 const char kSwiftShaderPath[] = "swiftshader-path";
44 // Inform Chrome that a GPU context will not be lost in power saving mode,
45 // screen saving mode, etc. Note that this flag does not ensure that a GPU
46 // context will never be lost in any situations, say, a GPU reset.
47 const char kGpuNoContextLost[] = "gpu-no-context-lost";
49 // Indicates whether the dual GPU switching is supported or not.
50 const char kSupportsDualGpus[] = "supports-dual-gpus";
52 // Flag used for Linux tests: for desktop GL bindings, try to load this GL
53 // library first, but fall back to regular library if loading fails.
54 const char kTestGLLib[] = "test-gl-lib";
56 // Use hardware gpu, if available, for tests.
57 const char kUseGpuInTests[] = "use-gpu-in-tests";
59 // On Windows only: use the WARP software rasterizer in the GPU process.
60 const char kUseWarp[] = "use-warp";
62 // Disables GL drawing operations which produce pixel output. With this
63 // the GL output will not be correct but tests will run faster.
64 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests";
66 // Forces the use of OSMesa instead of hardware gpu.
67 const char kOverrideUseGLWithOSMesaForTests[] =
68 "override-use-gl-with-osmesa-for-tests";
70 // This is the list of switches passed from this file that are passed from the
71 // GpuProcessHost to the GPU Process. Add your switch to this list if you need
72 // to read it in the GPU process, else don't add it.
73 const char* kGLSwitchesCopiedFromGpuProcessHost[] = {
76 kEnableGPUServiceLogging,
77 kEnableGPUServiceTracing,
79 kDisableGLDrawingForTests,
80 kOverrideUseGLWithOSMesaForTests,
83 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches =
84 arraysize(kGLSwitchesCopiedFromGpuProcessHost);
86 } // namespace switches