blob: 3a5e67cf9d665096a3b52771af512ab986729077 [file] [log] [blame]
Ahmed Fakhry15d707e2019-02-22 23:54:211// Copyright 2019 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 "ui/display/display_features.h"
6
Miguel Casas6193797c2020-09-26 00:29:307#include "build/build_config.h"
Yuta Hijikata9aae6d12020-11-19 06:20:588#include "build/chromeos_buildflags.h"
Miguel Casas6193797c2020-09-26 00:29:309
Ahmed Fakhry15d707e2019-02-22 23:54:2110namespace display {
11namespace features {
12
Yuta Hijikata9aae6d12020-11-19 06:20:5813#if BUILDFLAG(IS_CHROMEOS_ASH)
Miguel Casas8821b0982020-07-02 12:28:4914// Enables using HDR transfer function if the monitor says it supports it.
Miguel Casas6193797c2020-09-26 00:29:3015const base::Feature kUseHDRTransferFunction {
16 "UseHDRTransferFunction",
17 // TODO(b/168843009): Temporarily disable on ARM while investigating.
18#if defined(ARCH_CPU_ARM_FAMILY)
19 base::FEATURE_DISABLED_BY_DEFAULT
20#else
21 base::FEATURE_ENABLED_BY_DEFAULT
22#endif
23};
Miguel Casas8821b0982020-07-02 12:28:4924#endif
25
Ahmed Fakhry15d707e2019-02-22 23:54:2126// This features allows listing all display modes of external displays in the
27// display settings and setting any one of them exactly as requested, which can
28// be very useful for debugging and development purposes.
29const base::Feature kListAllDisplayModes = {"ListAllDisplayModes",
Bailey Berro77d415472020-06-12 17:39:1030 base::FEATURE_ENABLED_BY_DEFAULT};
Ahmed Fakhry15d707e2019-02-22 23:54:2131
32bool IsListAllDisplayModesEnabled() {
33 return base::FeatureList::IsEnabled(kListAllDisplayModes);
34}
35
Gil Dekelbfe93adb2021-08-09 18:17:1736// A temporary flag to control hardware mirroring until it is decided whether to
37// permanently remove hardware mirroring support. See crbug.com/1161556 for
38// details.
Gil Dekel11cbdfb2020-12-23 21:43:2739const base::Feature kEnableHardwareMirrorMode{
40 "EnableHardwareMirrorMode", base::FEATURE_DISABLED_BY_DEFAULT};
41
42bool IsHardwareMirrorModeEnabled() {
43 return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode);
44}
45
Mark Yacoubb3a7f162022-04-26 04:41:0146// A temporary flag to require Content Protection to use provisioned key as the
47// kernel doesn't expose that it requires this yet.(b/112172923)
48const base::Feature kRequireHdcpKeyProvisioning{
49 "RequireHdcpKeyProvisioning", base::FEATURE_DISABLED_BY_DEFAULT};
50bool IsHdcpKeyProvisioningRequired() {
51 return base::FeatureList::IsEnabled(kRequireHdcpKeyProvisioning);
52}
53
Ahmed Fakhry15d707e2019-02-22 23:54:2154} // namespace features
55} // namespace display