| Index: remoting/host/host_attributes.cc
|
| diff --git a/remoting/host/host_attributes.cc b/remoting/host/host_attributes.cc
|
| index 307d04e289fd66c4df9a4ed1219155dcf2904287..d75157442cf56a0ae0ee6ef865f4f670de0733a7 100644
|
| --- a/remoting/host/host_attributes.cc
|
| +++ b/remoting/host/host_attributes.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "build/build_config.h"
|
| +#include "remoting/host/safe_mode.h"
|
|
|
| #if defined(OS_WIN)
|
| #include "third_party/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h"
|
| @@ -65,7 +66,19 @@ inline constexpr bool IsNonOfficialBuild() {
|
| }
|
|
|
| #if defined(OS_WIN)
|
| +inline bool IsDirectxCapturerSupported() {
|
| + if (ExecuteHostInSafeMode()) {
|
| + return false;
|
| + }
|
| +
|
| + return webrtc::ScreenCapturerWinDirectx::IsSupported();
|
| +}
|
| +
|
| inline bool MinD3DFeatureLevelGreatThan10() {
|
| + if (ExecuteHostInSafeMode()) {
|
| + return false;
|
| + }
|
| +
|
| webrtc::DxgiDuplicatorController::D3dInfo info;
|
| if (webrtc::DxgiDuplicatorController::Instance()->RetrieveD3dInfo(&info)) {
|
| return info.min_feature_level >= D3D_FEATURE_LEVEL_10_0;
|
| @@ -74,6 +87,10 @@ inline bool MinD3DFeatureLevelGreatThan10() {
|
| }
|
|
|
| inline bool MinD3DFeatureLevelGreatThan11() {
|
| + if (ExecuteHostInSafeMode()) {
|
| + return false;
|
| + }
|
| +
|
| webrtc::DxgiDuplicatorController::D3dInfo info;
|
| if (webrtc::DxgiDuplicatorController::Instance()->RetrieveD3dInfo(&info)) {
|
| return info.min_feature_level >= D3D_FEATURE_LEVEL_11_0;
|
| @@ -82,6 +99,10 @@ inline bool MinD3DFeatureLevelGreatThan11() {
|
| }
|
|
|
| inline bool MinD3DFeatureLevelGreatThan12() {
|
| + if (ExecuteHostInSafeMode()) {
|
| + return false;
|
| + }
|
| +
|
| webrtc::DxgiDuplicatorController::D3dInfo info;
|
| if (webrtc::DxgiDuplicatorController::Instance()->RetrieveD3dInfo(&info)) {
|
| return info.min_feature_level >= D3D_FEATURE_LEVEL_12_0;
|
| @@ -106,8 +127,9 @@ static constexpr Attribute kAttributes[] = {
|
| { "ChromiumBrand", &IsChromiumBranded },
|
| { "OfficialBuild", &IsOfficialBuild },
|
| { "NonOfficialBuild", &IsNonOfficialBuild },
|
| + { "Safe-Mode", &ExecuteHostInSafeMode },
|
| #if defined(OS_WIN)
|
| - { "DirectX-Capturer", &webrtc::ScreenCapturerWinDirectx::IsSupported },
|
| + { "DirectX-Capturer", &IsDirectxCapturerSupported },
|
| { "MinD3DGT10", &MinD3DFeatureLevelGreatThan10 },
|
| { "MinD3DGT11", &MinD3DFeatureLevelGreatThan11 },
|
| { "MinD3DGT12", &MinD3DFeatureLevelGreatThan12 },
|
|
|