OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/browser/desktop_capture.h" |
| 6 |
| 7 #include "base/feature_list.h" |
| 8 #include "build/build_config.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 webrtc::DesktopCaptureOptions CreateDesktopCaptureOptions() { |
| 13 auto options = webrtc::DesktopCaptureOptions::CreateDefault(); |
| 14 // Leave desktop effects enabled during WebRTC captures. |
| 15 options.set_disable_effects(false); |
| 16 #if defined(OS_WIN) |
| 17 static constexpr base::Feature kDirectXCapturer{ |
| 18 "DirectXCapturer", |
| 19 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 20 if (base::FeatureList::IsEnabled(kDirectXCapturer)) { |
| 21 options.set_allow_directx_capturer(true); |
| 22 options.set_allow_use_magnification_api(false); |
| 23 } else { |
| 24 options.set_allow_use_magnification_api(true); |
| 25 } |
| 26 #endif // defined(OS_WIN) |
| 27 return options; |
| 28 } |
| 29 |
| 30 } // namespace content |
OLD | NEW |