#include "ui/display/display_features.h"
#include "base/feature_list.h"
#include "base/features.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
namespace display {
namespace features {
#if BUILDFLAG(IS_WIN)
BASE_FEATURE(kSkipEmptyDisplayHotplugEvent, base::FEATURE_ENABLED_BY_DEFAULT);
#endif
#if BUILDFLAG(IS_CHROMEOS)
BASE_FEATURE(kUseHDRTransferFunction,
#if defined(ARCH_CPU_ARM_FAMILY)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
);
BASE_FEATURE(kEnableExternalDisplayHDR10Mode,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kCtmColorManagement, base::FEATURE_ENABLED_BY_DEFAULT);
#endif
BASE_FEATURE(kListAllDisplayModes, base::FEATURE_ENABLED_BY_DEFAULT);
bool IsListAllDisplayModesEnabled() {
return base::FeatureList::IsEnabled(kListAllDisplayModes);
}
BASE_FEATURE(kEnableEdidBasedDisplayIds, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsEdidBasedDisplayIdsEnabled() {
return base::FeatureList::IsEnabled(kEnableEdidBasedDisplayIds);
}
BASE_FEATURE(kOledScaleFactorEnabled, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsOledScaleFactorEnabled() {
return base::FeatureList::IsEnabled(kOledScaleFactorEnabled);
}
BASE_FEATURE(kEnableHardwareMirrorMode, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsHardwareMirrorModeEnabled() {
return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode);
}
BASE_FEATURE(kRequireHdcpKeyProvisioning, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsHdcpKeyProvisioningRequired() {
return base::FeatureList::IsEnabled(kRequireHdcpKeyProvisioning);
}
BASE_FEATURE(kPanelSelfRefresh2, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsPanelSelfRefresh2Enabled() {
return base::FeatureList::IsEnabled(kPanelSelfRefresh2);
}
BASE_FEATURE(kTiledDisplaySupport, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsTiledDisplaySupportEnabled() {
return base::FeatureList::IsEnabled(kTiledDisplaySupport);
}
BASE_FEATURE(kExcludeDisplayInMirrorMode, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsExcludeDisplayInMirrorModeEnabled() {
return base::FeatureList::IsEnabled(kExcludeDisplayInMirrorMode);
}
BASE_FEATURE(kFastDrmMasterDrop, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsFastDrmMasterDropEnabled() {
return base::FeatureList::IsEnabled(kFastDrmMasterDrop);
}
BASE_FEATURE(kFormFactorControlsSubpixelRendering,
base::FEATURE_ENABLED_BY_DEFAULT);
bool DoesFormFactorControlSubpixelRendering() {
return base::FeatureList::IsEnabled(kFormFactorControlsSubpixelRendering);
}
BASE_FEATURE(kOpsDisplayScaleFactor, base::FEATURE_DISABLED_BY_DEFAULT);
bool IsOpsDisplayScaleFactorEnabled() {
return base::FeatureList::IsEnabled(kOpsDisplayScaleFactor);
}
BASE_FEATURE(kScreenWinDisplayLookupByHMONITOR,
base::FEATURE_DISABLED_BY_DEFAULT);
bool IsScreenWinDisplayLookupByHMONITOREnabled() {
return base::FeatureList::IsEnabled(base::features::kReducePPMs) &&
base::FeatureList::IsEnabled(kScreenWinDisplayLookupByHMONITOR);
}
BASE_FEATURE(kMaxExternalDisplaySupportedNotification,
base::FEATURE_DISABLED_BY_DEFAULT);
const base::FeatureParam<int> kMaxExternalDisplaySupportedNotificationLimit{
&kMaxExternalDisplaySupportedNotification, "display_limit", -1};
bool IsMaxExternalDisplaySupportedNotificationEnabled() {
return base::FeatureList::IsEnabled(
kMaxExternalDisplaySupportedNotification) &&
kMaxExternalDisplaySupportedNotificationLimit.Get() >= 0;
}
}
}