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 #include "base/basictypes.h" |
7 | 7 |
8 namespace gfx { | 8 namespace gfx { |
9 | 9 |
10 const char kGLImplementationDesktopName[] = "desktop"; | 10 const char kGLImplementationDesktopName[] = "desktop"; |
11 const char kGLImplementationOSMesaName[] = "osmesa"; | 11 const char kGLImplementationOSMesaName[] = "osmesa"; |
12 const char kGLImplementationAppleName[] = "apple"; | 12 const char kGLImplementationAppleName[] = "apple"; |
13 const char kGLImplementationEGLName[] = "egl"; | 13 const char kGLImplementationEGLName[] = "egl"; |
14 const char kGLImplementationSwiftShaderName[] = "swiftshader"; | 14 const char kGLImplementationSwiftShaderName[] = "swiftshader"; |
15 const char kGLImplementationMockName[] = "mock"; | 15 const char kGLImplementationMockName[] = "mock"; |
16 | 16 |
17 } // namespace gfx | 17 } // namespace gfx |
18 | 18 |
19 namespace switches { | 19 namespace switches { |
20 | 20 |
21 // Enables use of D3D11 when available. | 21 // Enables use of D3D11 when available. |
22 const char kEnableD3D11[] = "enable-d3d11"; | 22 const char kEnableD3D11[] = "enable-d3d11"; |
23 | 23 |
24 // Disables use of D3D11. | 24 // Disables use of D3D11. |
25 const char kDisableD3D11[] = "disable-d3d11"; | 25 const char kDisableD3D11[] = "disable-d3d11"; |
26 | 26 |
27 // Stop the GPU from synchronizing on the vsync before presenting. | 27 // Stop the GPU from synchronizing on the vsync before presenting. |
28 const char kDisableGpuVsync[] = "disable-gpu-vsync"; | 28 const char kDisableGpuVsync[] = "disable-gpu-vsync"; |
29 | 29 |
30 // Turns on GPU logging (debug build only). | |
31 const char kEnableGPUServiceLogging[] = "enable-gpu-service-logging"; | |
32 const char kEnableGPUClientLogging[] = "enable-gpu-client-logging"; | |
33 | |
34 // Turns on calling TRACE for every GL call. | 30 // Turns on calling TRACE for every GL call. |
35 const char kEnableGPUServiceTracing[] = "enable-gpu-service-tracing"; | 31 const char kEnableGPUServiceTracing[] = "enable-gpu-service-tracing"; |
36 | 32 |
37 // Select which implementation of GL the GPU process should use. Options are: | 33 // Select which implementation of GL the GPU process should use. Options are: |
38 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac | 34 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac |
39 // default). | 35 // default). |
40 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually | 36 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually |
41 // ANGLE). | 37 // ANGLE). |
42 // osmesa: The OSMesa software renderer. | 38 // osmesa: The OSMesa software renderer. |
43 const char kUseGL[] = "use-gl"; | 39 const char kUseGL[] = "use-gl"; |
(...skipping 23 matching lines...) Expand all Loading... |
67 // library first, but fall back to regular library if loading fails. | 63 // library first, but fall back to regular library if loading fails. |
68 const char kTestGLLib[] = "test-gl-lib"; | 64 const char kTestGLLib[] = "test-gl-lib"; |
69 | 65 |
70 // This is the list of switches passed from this file that are passed from the | 66 // 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 | 67 // 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. | 68 // to read it in the GPU process, else don't add it. |
73 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { | 69 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { |
74 kDisableGpuVsync, | 70 kDisableGpuVsync, |
75 kEnableD3D11, | 71 kEnableD3D11, |
76 kDisableD3D11, | 72 kDisableD3D11, |
77 kEnableGPUServiceLogging, | |
78 kEnableGPUServiceTracing, | |
79 kGpuNoContextLost, | 73 kGpuNoContextLost, |
80 }; | 74 }; |
81 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = | 75 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = |
82 arraysize(kGLSwitchesCopiedFromGpuProcessHost); | 76 arraysize(kGLSwitchesCopiedFromGpuProcessHost); |
83 | 77 |
84 } // namespace switches | 78 } // namespace switches |
85 | 79 |
OLD | NEW |