Chromium Code Reviews| Index: content/browser/gpu/gpu_data_manager_impl_private.cc |
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| index 9bfb5f5722daf4144ff28636200e7cdce259762f..548401d51ded20a801d5d4c56a67f234c13132ad 100644 |
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc |
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| @@ -319,6 +319,19 @@ void AdjustGpuSwitchingOption(std::set<int>* workarounds) { |
| } |
| } |
| +void UpdateAcceleratedVideoDecode( |
| + const GpuDataManagerImplPrivate* gpu_manager, CommandLine* command_line) { |
| +#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_ANDROID) |
| + if (gpu_manager->IsFeatureBlacklisted( |
| + gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
| + !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| + command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
|
dshwang
2014/03/06 12:44:37
My previous CL is wrong. linux & mac must append k
|
| +#else |
| + if (!command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| + command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
| +#endif |
| +} |
| + |
| // Block all domains' use of 3D APIs for this many milliseconds if |
| // approaching a threshold where system stability might be compromised. |
| const int64 kBlockAllDomainsMs = 10000; |
| @@ -646,9 +659,7 @@ void GpuDataManagerImplPrivate::AppendRendererCommandLine( |
| if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && |
| !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) |
| command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
| - if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
| - !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| - command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
| + UpdateAcceleratedVideoDecode(this, command_line); |
| #if defined(ENABLE_WEBRTC) |
| if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
| !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
| @@ -706,10 +717,7 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine( |
| IntSetToString(gpu_driver_bugs_)); |
| } |
| - if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
| - !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
| - command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
| - } |
| + UpdateAcceleratedVideoDecode(this, command_line); |
| #if defined(ENABLE_WEBRTC) |
| if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE) && |
| !command_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { |