display_features.cc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #include "ui/display/display_features.h"
  5. #include "base/feature_list.h"
  6. #include "build/build_config.h"
  7. #include "build/chromeos_buildflags.h"
  8. namespace display {
  9. namespace features {
  10. #if BUILDFLAG(IS_CHROMEOS_ASH)
  11. // Enables the rounded corners for the internal display.
  12. const base::Feature kRoundedDisplay{"RoundedDisplay",
  13. base::FEATURE_DISABLED_BY_DEFAULT};
  14. bool IsRoundedDisplayEnabled() {
  15. return base::FeatureList::IsEnabled(kRoundedDisplay);
  16. }
  17. // Enables using HDR transfer function if the monitor says it supports it.
  18. const base::Feature kUseHDRTransferFunction {
  19. "UseHDRTransferFunction",
  20. // TODO(b/168843009): Temporarily disable on ARM while investigating.
  21. #if defined(ARCH_CPU_ARM_FAMILY)
  22. base::FEATURE_DISABLED_BY_DEFAULT
  23. #else
  24. base::FEATURE_ENABLED_BY_DEFAULT
  25. #endif
  26. };
  27. #endif
  28. // This features allows listing all display modes of external displays in the
  29. // display settings and setting any one of them exactly as requested, which can
  30. // be very useful for debugging and development purposes.
  31. const base::Feature kListAllDisplayModes = {"ListAllDisplayModes",
  32. base::FEATURE_ENABLED_BY_DEFAULT};
  33. bool IsListAllDisplayModesEnabled() {
  34. return base::FeatureList::IsEnabled(kListAllDisplayModes);
  35. }
  36. // 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.
  39. const base::Feature kEnableHardwareMirrorMode{
  40. "EnableHardwareMirrorMode", base::FEATURE_DISABLED_BY_DEFAULT};
  41. bool IsHardwareMirrorModeEnabled() {
  42. return base::FeatureList::IsEnabled(kEnableHardwareMirrorMode);
  43. }
  44. // A temporary flag to require Content Protection to use provisioned key as the
  45. // kernel doesn't expose that it requires this yet.(b/112172923)
  46. const base::Feature kRequireHdcpKeyProvisioning{
  47. "RequireHdcpKeyProvisioning", base::FEATURE_DISABLED_BY_DEFAULT};
  48. bool IsHdcpKeyProvisioningRequired() {
  49. return base::FeatureList::IsEnabled(kRequireHdcpKeyProvisioning);
  50. }
  51. } // namespace features
  52. } // namespace display