blob: ccb6f6b6bbb3d94386aafed65da0acd6a9861396 [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 Dekel11cbdfb2020-12-23 21:43:2736// TODO(crbug.com/1161556): Add a flag to control hardware mirroring as the
37// first step towards permanently disabling hardware mirroring. This will be
38// removed once no critical regression is seen by removing HW mirroring.
39const base::Feature kEnableHardwareMirrorMode{
40 "EnableHardwareMirrorMode", base::FEATURE_DISABLED_BY_DEFAULT};
41
42bool IsHardwareMirrorModeEnabled() {
43 return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode);
44}
45
Ahmed Fakhry15d707e2019-02-22 23:54:2146} // namespace features
47} // namespace display