Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: content/public/browser/gpu_utils.cc

Issue 2573933002: Restore switch kDisableWebRtcHWEncoding (Closed)
Patch Set: keep switches in right order Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "content/public/browser/gpu_utils.h" 5 #include "content/public/browser/gpu_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "content/public/common/content_features.h" 9 #include "content/public/common/content_features.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 29 matching lines...) Expand all
40 gpu_preferences.ui_prioritize_in_gpu_process = 40 gpu_preferences.ui_prioritize_in_gpu_process =
41 command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess); 41 command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess);
42 gpu_preferences.disable_accelerated_video_decode = 42 gpu_preferences.disable_accelerated_video_decode =
43 command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); 43 command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
44 #if defined(OS_CHROMEOS) 44 #if defined(OS_CHROMEOS)
45 gpu_preferences.disable_vaapi_accelerated_video_encode = 45 gpu_preferences.disable_vaapi_accelerated_video_encode =
46 command_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode); 46 command_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
47 #endif 47 #endif
48 #if BUILDFLAG(ENABLE_WEBRTC) 48 #if BUILDFLAG(ENABLE_WEBRTC)
49 gpu_preferences.disable_web_rtc_hw_encoding = 49 gpu_preferences.disable_web_rtc_hw_encoding =
50 command_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding) && 50 command_line->HasSwitch(switches::kDisableWebRtcHWEncoding) ||
51 !base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding); 51 (command_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding) &&
52 !base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding));
Pawel Osciak 2016/12/21 01:12:57 Previously we disabled this only based on kDisable
braveyao 2016/12/21 02:01:40 No. For RTC, only VP8 and H264 are available on al
52 #endif 53 #endif
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
54 uint32_t enable_accelerated_vpx_decode_val = 55 uint32_t enable_accelerated_vpx_decode_val =
55 gpu::GpuPreferences::VPX_VENDOR_MICROSOFT; 56 gpu::GpuPreferences::VPX_VENDOR_MICROSOFT;
56 if (GetUintFromSwitch(command_line, switches::kEnableAcceleratedVpxDecode, 57 if (GetUintFromSwitch(command_line, switches::kEnableAcceleratedVpxDecode,
57 &enable_accelerated_vpx_decode_val)) { 58 &enable_accelerated_vpx_decode_val)) {
58 gpu_preferences.enable_accelerated_vpx_decode = 59 gpu_preferences.enable_accelerated_vpx_decode =
59 static_cast<gpu::GpuPreferences::VpxDecodeVendors>( 60 static_cast<gpu::GpuPreferences::VpxDecodeVendors>(
60 enable_accelerated_vpx_decode_val); 61 enable_accelerated_vpx_decode_val);
61 } 62 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 gpu_preferences.enable_gpu_service_tracing = 110 gpu_preferences.enable_gpu_service_tracing =
110 command_line->HasSwitch(switches::kEnableGPUServiceTracing); 111 command_line->HasSwitch(switches::kEnableGPUServiceTracing);
111 gpu_preferences.use_passthrough_cmd_decoder = 112 gpu_preferences.use_passthrough_cmd_decoder =
112 command_line->HasSwitch(switches::kUsePassthroughCmdDecoder); 113 command_line->HasSwitch(switches::kUsePassthroughCmdDecoder);
113 // Some of these preferences are set or adjusted in 114 // Some of these preferences are set or adjusted in
114 // GpuDataManagerImplPrivate::AppendGpuCommandLine. 115 // GpuDataManagerImplPrivate::AppendGpuCommandLine.
115 return gpu_preferences; 116 return gpu_preferences;
116 } 117 }
117 118
118 } // namespace content 119 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698