Ahmed Fakhry | 15d707e | 2019-02-22 23:54:21 | [diff] [blame] | 1 | // 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 Casas | 6193797c | 2020-09-26 00:29:30 | [diff] [blame] | 7 | #include "build/build_config.h" |
Yuta Hijikata | 9aae6d1 | 2020-11-19 06:20:58 | [diff] [blame] | 8 | #include "build/chromeos_buildflags.h" |
Miguel Casas | 6193797c | 2020-09-26 00:29:30 | [diff] [blame] | 9 | |
Ahmed Fakhry | 15d707e | 2019-02-22 23:54:21 | [diff] [blame] | 10 | namespace display { |
| 11 | namespace features { |
| 12 | |
Yuta Hijikata | 9aae6d1 | 2020-11-19 06:20:58 | [diff] [blame] | 13 | #if BUILDFLAG(IS_CHROMEOS_ASH) |
Miguel Casas | 8821b098 | 2020-07-02 12:28:49 | [diff] [blame] | 14 | // Enables using HDR transfer function if the monitor says it supports it. |
Miguel Casas | 6193797c | 2020-09-26 00:29:30 | [diff] [blame] | 15 | const 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 Casas | 8821b098 | 2020-07-02 12:28:49 | [diff] [blame] | 24 | #endif |
| 25 | |
Ahmed Fakhry | 15d707e | 2019-02-22 23:54:21 | [diff] [blame] | 26 | // 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. |
| 29 | const base::Feature kListAllDisplayModes = {"ListAllDisplayModes", |
Bailey Berro | 77d41547 | 2020-06-12 17:39:10 | [diff] [blame] | 30 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Ahmed Fakhry | 15d707e | 2019-02-22 23:54:21 | [diff] [blame] | 31 | |
| 32 | bool IsListAllDisplayModesEnabled() { |
| 33 | return base::FeatureList::IsEnabled(kListAllDisplayModes); |
| 34 | } |
| 35 | |
Gil Dekel | 11cbdfb | 2020-12-23 21:43:27 | [diff] [blame^] | 36 | // 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. |
| 39 | const base::Feature kEnableHardwareMirrorMode{ |
| 40 | "EnableHardwareMirrorMode", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 41 | |
| 42 | bool IsHardwareMirrorModeEnabled() { |
| 43 | return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode); |
| 44 | } |
| 45 | |
Ahmed Fakhry | 15d707e | 2019-02-22 23:54:21 | [diff] [blame] | 46 | } // namespace features |
| 47 | } // namespace display |