Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "gpu/command_buffer/common/constants.h" | 12 #include "gpu/command_buffer/common/constants.h" |
| 13 #include "gpu/gpu_export.h" | 13 #include "gpu/gpu_export.h" |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 | 16 |
| 17 struct GPU_EXPORT GpuPreferences { | 17 struct GPU_EXPORT GpuPreferences { |
| 18 public: | 18 public: |
| 19 GpuPreferences(); | 19 GpuPreferences(); |
| 20 | 20 |
| 21 GpuPreferences(const GpuPreferences& other); | 21 GpuPreferences(const GpuPreferences& other); |
| 22 | 22 |
| 23 ~GpuPreferences(); | 23 ~GpuPreferences(); |
| 24 | 24 |
| 25 // support for accelerated Vpx decoding for various vendors | |
| 26 // intended to be used as a bitfield | |
| 27 enum VpxDecodeVendors | |
| 28 { | |
| 29 kVpxVendorNone = 0x00, | |
|
jbauman
2016/07/06 21:06:49
Switch these to "VPX_VENDOR_NONE" style - see http
| |
| 30 kVpxVendorIntel = 0x01, | |
| 31 kVpxVendorAmd = 0x02, | |
| 32 kVpxVendorAll = 0xff, | |
| 33 }; | |
| 25 // =================================== | 34 // =================================== |
| 26 // Settings from //content/public/common/content_switches.h | 35 // Settings from //content/public/common/content_switches.h |
| 27 | 36 |
| 28 // Runs the renderer and plugins in the same process as the browser. | 37 // Runs the renderer and plugins in the same process as the browser. |
| 29 bool single_process = false; | 38 bool single_process = false; |
| 30 | 39 |
| 31 // Run the GPU process as a thread in the browser process. | 40 // Run the GPU process as a thread in the browser process. |
| 32 bool in_process_gpu = false; | 41 bool in_process_gpu = false; |
| 33 | 42 |
| 34 // Prioritizes the UI's command stream in the GPU process. | 43 // Prioritizes the UI's command stream in the GPU process. |
| 35 bool ui_prioritize_in_gpu_process = false; | 44 bool ui_prioritize_in_gpu_process = false; |
| 36 | 45 |
| 37 // Disables hardware acceleration of video decode, where available. | 46 // Disables hardware acceleration of video decode, where available. |
| 38 bool disable_accelerated_video_decode = false; | 47 bool disable_accelerated_video_decode = false; |
| 39 | 48 |
| 40 #if defined(OS_CHROMEOS) | 49 #if defined(OS_CHROMEOS) |
| 41 // Disables VA-API accelerated video encode. | 50 // Disables VA-API accelerated video encode. |
| 42 bool disable_vaapi_accelerated_video_encode = false; | 51 bool disable_vaapi_accelerated_video_encode = false; |
| 43 #endif | 52 #endif |
| 44 | 53 |
| 45 #if defined(ENABLE_WEBRTC) | 54 #if defined(ENABLE_WEBRTC) |
| 46 // Disables HW encode acceleration for WebRTC. | 55 // Disables HW encode acceleration for WebRTC. |
| 47 bool disable_web_rtc_hw_encoding = false; | 56 bool disable_web_rtc_hw_encoding = false; |
| 48 #endif | 57 #endif |
| 49 | 58 |
| 50 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 51 // Enables experimental hardware acceleration for VP8/VP9 video decoding. | 60 // Enables experimental hardware acceleration for VP8/VP9 video decoding |
| 52 bool enable_accelerated_vpx_decode = false; | 61 // bitmask - 0x1=Intel; 0x2=AMD; 0xff=all |
| 62 | |
| 63 VpxDecodeVendors enable_accelerated_vpx_decode = kVpxVendorNone; | |
| 53 | 64 |
| 54 // Enables support for avoiding copying DXGI NV12 textures. | 65 // Enables support for avoiding copying DXGI NV12 textures. |
| 55 bool enable_zero_copy_dxgi_video = false; | 66 bool enable_zero_copy_dxgi_video = false; |
| 56 #endif | 67 #endif |
| 57 | 68 |
| 58 // =================================== | 69 // =================================== |
| 59 // Settings from //gpu/command_buffer/service/gpu_switches.cc | 70 // Settings from //gpu/command_buffer/service/gpu_switches.cc |
| 60 | 71 |
| 61 // Always return success when compiling a shader. Linking will still fail. | 72 // Always return success when compiling a shader. Linking will still fail. |
| 62 bool compile_shader_always_succeeds = false; | 73 bool compile_shader_always_succeeds = false; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 bool enable_unsafe_es3_apis = false; | 136 bool enable_unsafe_es3_apis = false; |
| 126 | 137 |
| 127 // Use the Pass-through command decoder, skipping all validation and state | 138 // Use the Pass-through command decoder, skipping all validation and state |
| 128 // tracking. | 139 // tracking. |
| 129 bool use_passthrough_cmd_decoder = false; | 140 bool use_passthrough_cmd_decoder = false; |
| 130 }; | 141 }; |
| 131 | 142 |
| 132 } // namespace gpu | 143 } // namespace gpu |
| 133 | 144 |
| 134 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ | 145 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PREFERENCES_H_ |
| OLD | NEW |