| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // gl: Desktop GL renderer, ES2 and ES3. | 61 // gl: Desktop GL renderer, ES2 and ES3. |
| 62 // gles: GLES renderer, ES2 and ES3. | 62 // gles: GLES renderer, ES2 and ES3. |
| 63 const char kUseANGLE[] = "use-angle"; | 63 const char kUseANGLE[] = "use-angle"; |
| 64 | 64 |
| 65 // Select which implementation of GL the GPU process should use. Options are: | 65 // Select which implementation of GL the GPU process should use. Options are: |
| 66 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac | 66 // desktop: whatever desktop OpenGL the user has installed (Linux and Mac |
| 67 // default). | 67 // default). |
| 68 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually | 68 // egl: whatever EGL / GLES2 the user has installed (Windows default - actually |
| 69 // ANGLE). | 69 // ANGLE). |
| 70 // osmesa: The OSMesa software renderer. | 70 // osmesa: The OSMesa software renderer. |
| 71 // swiftshader: The SwiftShader software renderer. |
| 71 const char kUseGL[] = "use-gl"; | 72 const char kUseGL[] = "use-gl"; |
| 72 | 73 |
| 73 const char kSwiftShaderPath[] = "swiftshader-path"; | 74 const char kSwiftShaderPath[] = "swiftshader-path"; |
| 74 | 75 |
| 75 // Inform Chrome that a GPU context will not be lost in power saving mode, | 76 // Inform Chrome that a GPU context will not be lost in power saving mode, |
| 76 // screen saving mode, etc. Note that this flag does not ensure that a GPU | 77 // screen saving mode, etc. Note that this flag does not ensure that a GPU |
| 77 // context will never be lost in any situations, say, a GPU reset. | 78 // context will never be lost in any situations, say, a GPU reset. |
| 78 const char kGpuNoContextLost[] = "gpu-no-context-lost"; | 79 const char kGpuNoContextLost[] = "gpu-no-context-lost"; |
| 79 | 80 |
| 80 // Disables the use of DirectComposition to draw to the screen. | 81 // Disables the use of DirectComposition to draw to the screen. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 97 const char kDisableES3APIs[] = "disable-es3-apis"; | 98 const char kDisableES3APIs[] = "disable-es3-apis"; |
| 98 | 99 |
| 99 // Enable use of the SGI_video_sync extension, which can have | 100 // Enable use of the SGI_video_sync extension, which can have |
| 100 // driver/sandbox/window manager compatibility issues. | 101 // driver/sandbox/window manager compatibility issues. |
| 101 const char kEnableSgiVideoSync[] = "enable-sgi-video-sync"; | 102 const char kEnableSgiVideoSync[] = "enable-sgi-video-sync"; |
| 102 | 103 |
| 103 // Disables GL drawing operations which produce pixel output. With this | 104 // Disables GL drawing operations which produce pixel output. With this |
| 104 // the GL output will not be correct but tests will run faster. | 105 // the GL output will not be correct but tests will run faster. |
| 105 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests"; | 106 const char kDisableGLDrawingForTests[] = "disable-gl-drawing-for-tests"; |
| 106 | 107 |
| 107 // Forces the use of OSMesa instead of hardware gpu. | 108 // Forces the use of software GL instead of hardware gpu. |
| 108 const char kOverrideUseGLWithOSMesaForTests[] = | 109 const char kOverrideUseSoftwareGLForTests[] = |
| 109 "override-use-gl-with-osmesa-for-tests"; | 110 "override-use-software-gl-for-tests"; |
| 110 | 111 |
| 111 // Disables specified comma separated GL Extensions if found. | 112 // Disables specified comma separated GL Extensions if found. |
| 112 const char kDisableGLExtensions[] = "disable-gl-extensions"; | 113 const char kDisableGLExtensions[] = "disable-gl-extensions"; |
| 113 | 114 |
| 114 // Enables SwapBuffersWithBounds if it is supported. | 115 // Enables SwapBuffersWithBounds if it is supported. |
| 115 const char kEnableSwapBuffersWithBounds[] = "enable-swap-buffers-with-bounds"; | 116 const char kEnableSwapBuffersWithBounds[] = "enable-swap-buffers-with-bounds"; |
| 116 | 117 |
| 117 // This is the list of switches passed from this file that are passed from the | 118 // This is the list of switches passed from this file that are passed from the |
| 118 // GpuProcessHost to the GPU Process. Add your switch to this list if you need | 119 // GpuProcessHost to the GPU Process. Add your switch to this list if you need |
| 119 // to read it in the GPU process, else don't add it. | 120 // to read it in the GPU process, else don't add it. |
| 120 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { | 121 const char* kGLSwitchesCopiedFromGpuProcessHost[] = { |
| 121 kDisableGpuVsync, | 122 kDisableGpuVsync, |
| 122 kDisableD3D11, | 123 kDisableD3D11, |
| 123 kEnableGPUServiceLogging, | 124 kEnableGPUServiceLogging, |
| 124 kEnableGPUServiceTracing, | 125 kEnableGPUServiceTracing, |
| 125 kEnableSgiVideoSync, | 126 kEnableSgiVideoSync, |
| 126 kGpuNoContextLost, | 127 kGpuNoContextLost, |
| 127 kDisableGLDrawingForTests, | 128 kDisableGLDrawingForTests, |
| 128 kOverrideUseGLWithOSMesaForTests, | 129 kOverrideUseSoftwareGLForTests, |
| 129 kUseANGLE, | 130 kUseANGLE, |
| 130 kDisableDirectComposition, | 131 kDisableDirectComposition, |
| 131 kEnableSwapBuffersWithBounds, | 132 kEnableSwapBuffersWithBounds, |
| 132 }; | 133 }; |
| 133 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = | 134 const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches = |
| 134 arraysize(kGLSwitchesCopiedFromGpuProcessHost); | 135 arraysize(kGLSwitchesCopiedFromGpuProcessHost); |
| 135 | 136 |
| 136 } // namespace switches | 137 } // namespace switches |
| OLD | NEW |