blob: f5ee31f5a22859e197886074658efed5e8bfd7e0 [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2019 The Chromium Authors
Ahmed Fakhry15d707e2019-02-22 23:54:212// 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
Zoraiz Naeem20d0ed92022-06-27 23:57:297#include "base/feature_list.h"
Miguel Casas6193797c2020-09-26 00:29:308#include "build/build_config.h"
Yuta Hijikata9aae6d12020-11-19 06:20:589#include "build/chromeos_buildflags.h"
Miguel Casas6193797c2020-09-26 00:29:3010
Ahmed Fakhry15d707e2019-02-22 23:54:2111namespace display {
12namespace features {
13
Yuta Hijikata9aae6d12020-11-19 06:20:5814#if BUILDFLAG(IS_CHROMEOS_ASH)
Zoraiz Naeem20d0ed92022-06-27 23:57:2915
16// Enables the rounded corners for the internal display.
17const base::Feature kRoundedDisplay{"RoundedDisplay",
18 base::FEATURE_DISABLED_BY_DEFAULT};
19
20bool IsRoundedDisplayEnabled() {
21 return base::FeatureList::IsEnabled(kRoundedDisplay);
22}
23
Miguel Casas8821b0982020-07-02 12:28:4924// Enables using HDR transfer function if the monitor says it supports it.
Miguel Casas6193797c2020-09-26 00:29:3025const base::Feature kUseHDRTransferFunction {
26 "UseHDRTransferFunction",
27 // TODO(b/168843009): Temporarily disable on ARM while investigating.
28#if defined(ARCH_CPU_ARM_FAMILY)
29 base::FEATURE_DISABLED_BY_DEFAULT
30#else
31 base::FEATURE_ENABLED_BY_DEFAULT
32#endif
33};
Zoraiz Naeem20d0ed92022-06-27 23:57:2934
Miguel Casas8821b0982020-07-02 12:28:4935#endif
36
Ahmed Fakhry15d707e2019-02-22 23:54:2137// This features allows listing all display modes of external displays in the
38// display settings and setting any one of them exactly as requested, which can
39// be very useful for debugging and development purposes.
40const base::Feature kListAllDisplayModes = {"ListAllDisplayModes",
Bailey Berro77d415472020-06-12 17:39:1041 base::FEATURE_ENABLED_BY_DEFAULT};
Ahmed Fakhry15d707e2019-02-22 23:54:2142
43bool IsListAllDisplayModesEnabled() {
44 return base::FeatureList::IsEnabled(kListAllDisplayModes);
45}
46
Gil Dekelbfe93adb2021-08-09 18:17:1747// A temporary flag to control hardware mirroring until it is decided whether to
48// permanently remove hardware mirroring support. See crbug.com/1161556 for
49// details.
Gil Dekel11cbdfb2020-12-23 21:43:2750const base::Feature kEnableHardwareMirrorMode{
51 "EnableHardwareMirrorMode", base::FEATURE_DISABLED_BY_DEFAULT};
52
53bool IsHardwareMirrorModeEnabled() {
54 return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode);
55}
56
Mark Yacoubb3a7f162022-04-26 04:41:0157// A temporary flag to require Content Protection to use provisioned key as the
58// kernel doesn't expose that it requires this yet.(b/112172923)
59const base::Feature kRequireHdcpKeyProvisioning{
60 "RequireHdcpKeyProvisioning", base::FEATURE_DISABLED_BY_DEFAULT};
61bool IsHdcpKeyProvisioningRequired() {
62 return base::FeatureList::IsEnabled(kRequireHdcpKeyProvisioning);
63}
64
Ahmed Fakhry15d707e2019-02-22 23:54:2165} // namespace features
66} // namespace display