| 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "ui/gl/gl_switches.h" | 6 #include "ui/gl/gl_switches.h" |
| 7 | 7 |
| 8 namespace gl { | 8 namespace gl { |
| 9 | 9 |
| 10 const char kGLImplementationDesktopName[] = "desktop"; | 10 const char kGLImplementationDesktopName[] = "desktop"; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Indicates whether the dual GPU switching is supported or not. | 77 // Indicates whether the dual GPU switching is supported or not. |
| 78 const char kSupportsDualGpus[] = "supports-dual-gpus"; | 78 const char kSupportsDualGpus[] = "supports-dual-gpus"; |
| 79 | 79 |
| 80 // Flag used for Linux tests: for desktop GL bindings, try to load this GL | 80 // Flag used for Linux tests: for desktop GL bindings, try to load this GL |
| 81 // library first, but fall back to regular library if loading fails. | 81 // library first, but fall back to regular library if loading fails. |
| 82 const char kTestGLLib[] = "test-gl-lib"; | 82 const char kTestGLLib[] = "test-gl-lib"; |
| 83 | 83 |
| 84 // Use hardware gpu, if available, for tests. | 84 // Use hardware gpu, if available, for tests. |
| 85 const char kUseGpuInTests[] = "use-gpu-in-tests"; | 85 const char kUseGpuInTests[] = "use-gpu-in-tests"; |
| 86 | 86 |
| 87 // Enable OpenGL ES 3 APIs without proper service side validation. | |
| 88 const char kEnableUnsafeES3APIs[] = "enable-unsafe-es3-apis"; | |
| 89 | |
| 90 // Enable use of the SGI_video_sync extension, which can have | 87 // Enable use of the SGI_video_sync extension, which can have |
| 91 // driver/sandbox/window manager compatibility issues. | 88 // driver/sandbox/window manager compatibility issues. |
| 92 const char kEnableSgiVideoSync[] = "enable-sgi-video-sync"; | 89 const char kEnableSgiVideoSync[] = "enable-sgi-video-sync"; |
| 93 | 90 |
| 94 // Disables GL drawing operations which produce pixel output. With this | 91 // Disables GL drawing operations which produce pixel output. With this |
| 95 // the GL output will not be correct but tests will run faster. | 92 // the GL output will not be correct but tests will run faster. |
| 96 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests"; | 93 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests"; |
| 97 | 94 |
| 98 // Forces the use of OSMesa instead of hardware gpu. | 95 // Forces the use of OSMesa instead of hardware gpu. |
| 99 const char kOverrideUseGLWithOSMesaForTests[] = | 96 const char kOverrideUseGLWithOSMesaForTests[] = |
| 100 "override-use-gl-with-osmesa-for-tests"; | 97 "override-use-gl-with-osmesa-for-tests"; |
| 101 | 98 |
| 102 // Disables specified comma separated GL Extensions if found. | 99 // Disables specified comma separated GL Extensions if found. |
| 103 const char kDisableGLExtensions[] = "disable-gl-extensions"; | 100 const char kDisableGLExtensions[] = "disable-gl-extensions"; |
| 104 | 101 |
| 105 // Use EGL_KHR_swap_buffers_with_damage to implement PostSubBuffers | 102 // Use EGL_KHR_swap_buffers_with_damage to implement PostSubBuffers |
| 106 const char kEnableSwapBuffersWithDamage[] = "enable-swap-buffers-with-damage"; | 103 const char kEnableSwapBuffersWithDamage[] = "enable-swap-buffers-with-damage"; |
| 107 | 104 |
| 108 // This is the list of switches passed from this file that are passed from the | 105 // This is the list of switches passed from this file that are passed from the |
| 109 // GpuProcessHost to the GPU Process. Add your switch to this list if you need | 106 // GpuProcessHost to the GPU Process. Add your switch to this list if you need |
| 110 // to read it in the GPU process, else don't add it. | 107 // to read it in the GPU process, else don't add it. |
| 111 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { | 108 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { |
| 112 kDisableGpuVsync, | 109 kDisableGpuVsync, |
| 113 kDisableD3D11, | 110 kDisableD3D11, |
| 114 kEnableGPUServiceLogging, | 111 kEnableGPUServiceLogging, |
| 115 kEnableGPUServiceTracing, | 112 kEnableGPUServiceTracing, |
| 116 kEnableUnsafeES3APIs, | |
| 117 kEnableSgiVideoSync, | 113 kEnableSgiVideoSync, |
| 118 kGpuNoContextLost, | 114 kGpuNoContextLost, |
| 119 kDisableGLDrawingForTests, | 115 kDisableGLDrawingForTests, |
| 120 kOverrideUseGLWithOSMesaForTests, | 116 kOverrideUseGLWithOSMesaForTests, |
| 121 kUseANGLE, | 117 kUseANGLE, |
| 122 kDisableDirectComposition, | 118 kDisableDirectComposition, |
| 123 kEnableSwapBuffersWithDamage, | 119 kEnableSwapBuffersWithDamage, |
| 124 }; | 120 }; |
| 125 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = | 121 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = |
| 126 arraysize(kGLSwitchesCopiedFromGpuProcessHost); | 122 arraysize(kGLSwitchesCopiedFromGpuProcessHost); |
| 127 | 123 |
| 128 } // namespace switches | 124 } // namespace switches |
| OLD | NEW |