OLD | NEW |
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_switches.h" | 5 #include "ui/gl/gl_switches.h" |
| 6 #include "base/basictypes.h" |
6 | 7 |
7 namespace gfx { | 8 namespace gfx { |
8 | 9 |
9 const char kGLImplementationDesktopName[] = "desktop"; | 10 const char kGLImplementationDesktopName[] = "desktop"; |
10 const char kGLImplementationOSMesaName[] = "osmesa"; | 11 const char kGLImplementationOSMesaName[] = "osmesa"; |
11 const char kGLImplementationAppleName[] = "apple"; | 12 const char kGLImplementationAppleName[] = "apple"; |
12 const char kGLImplementationEGLName[] = "egl"; | 13 const char kGLImplementationEGLName[] = "egl"; |
13 const char kGLImplementationSwiftShaderName[] = "swiftshader"; | 14 const char kGLImplementationSwiftShaderName[] = "swiftshader"; |
14 const char kGLImplementationMockName[] = "mock"; | 15 const char kGLImplementationMockName[] = "mock"; |
15 | 16 |
16 } // namespace gfx | 17 } // namespace gfx |
17 | 18 |
18 namespace switches { | 19 namespace switches { |
19 | 20 |
20 // Stop the GPU from synchronizing on the vsync before presenting. | 21 // Stop the GPU from synchronizing on the vsync before presenting. |
21 const char kDisableGpuVsync[] = "disable-gpu-vsync"; | 22 const char kDisableGpuVsync[] = "disable-gpu-vsync"; |
22 | 23 |
23 // Turns on GPU logging (debug build only). | 24 // Turns on GPU logging (debug build only). |
24 const char kEnableGPUServiceLogging[] = "enable-gpu-service-logging"; | 25 const char kEnableGPUServiceLogging[] = "enable-gpu-service-logging"; |
25 const char kEnableGPUClientLogging[] = "enable-gpu-client-logging"; | 26 const char kEnableGPUClientLogging[] = "enable-gpu-client-logging"; |
26 | 27 |
| 28 // Turns on calling TRACE for every GL call. |
| 29 const char kEnableGPUServiceTracing[] = "enable-gpu-service-tracing"; |
| 30 |
27 // Select which implementation of GL the GPU process should use. Options are: | 31 // Select which implementation of GL the GPU process should use. Options are: |
28 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac | 32 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac |
29 // default). | 33 // default). |
30 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually | 34 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually |
31 // ANGLE). | 35 // ANGLE). |
32 // osmesa: The OSMesa software renderer. | 36 // osmesa: The OSMesa software renderer. |
33 const char kUseGL[] = "use-gl"; | 37 const char kUseGL[] = "use-gl"; |
34 | 38 |
35 const char kSwiftShaderPath[] = "swiftshader-path"; | 39 const char kSwiftShaderPath[] = "swiftshader-path"; |
36 | 40 |
(...skipping 14 matching lines...) Expand all Loading... |
51 const char kGpuSwitching[] = "gpu-switching"; | 55 const char kGpuSwitching[] = "gpu-switching"; |
52 | 56 |
53 const char kGpuSwitchingOptionNameForceIntegrated[] = "force_integrated"; | 57 const char kGpuSwitchingOptionNameForceIntegrated[] = "force_integrated"; |
54 const char kGpuSwitchingOptionNameForceDiscrete[] = "force_discrete"; | 58 const char kGpuSwitchingOptionNameForceDiscrete[] = "force_discrete"; |
55 const char kGpuSwitchingOptionNameAutomatic[] = "automatic"; | 59 const char kGpuSwitchingOptionNameAutomatic[] = "automatic"; |
56 | 60 |
57 // Flag used for Linux tests: for desktop GL bindings, try to load this GL | 61 // Flag used for Linux tests: for desktop GL bindings, try to load this GL |
58 // library first, but fall back to regular library if loading fails. | 62 // library first, but fall back to regular library if loading fails. |
59 const char kTestGLLib[] = "test-gl-lib"; | 63 const char kTestGLLib[] = "test-gl-lib"; |
60 | 64 |
| 65 // This is the list of switches passed from this file that are passed from the |
| 66 // GpuProcessHost to the GPU Process. Add your switch to this list if you need |
| 67 // to read it in the GPU process, else don't add it. |
| 68 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { |
| 69 kDisableGpuVsync, |
| 70 kEnableGPUServiceLogging, |
| 71 kEnableGPUServiceTracing, |
| 72 kGpuNoContextLost, |
| 73 kGpuSwitching, |
| 74 }; |
| 75 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = |
| 76 arraysize(kGLSwitchesCopiedFromGpuProcessHost); |
| 77 |
61 } // namespace switches | 78 } // namespace switches |
62 | 79 |
OLD | NEW |