1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
From dcc972ec3451eaf88c2289a6f4852b24e901f26d Mon Sep 17 00:00:00 2001
From: Max Ihlenfeldt <max@igalia.com>
Date: Thu, 31 Aug 2023 10:27:47 +0000
Subject: [PATCH 12/33] [meta-browser] Fix "constexpr variable cannot have
non-literal type" errors
Something about Chromium's `base::flat_map` /
`base::internal::flat_tree` isn't considered a literal type by older
clang versions, meaning they can't be used in constexpr expressions. We
need to change them to be const instead.
Upstream-Status: Inappropriate [specific to older versions of clang]
Signed-off-by: Max Ihlenfeldt <max@igalia.com>
---
ui/base/wayland/color_manager_util.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ui/base/wayland/color_manager_util.h b/ui/base/wayland/color_manager_util.h
index c54ace574e52e..e25abe8e5d722 100644
--- a/ui/base/wayland/color_manager_util.h
+++ b/ui/base/wayland/color_manager_util.h
@@ -53,7 +53,7 @@ struct RangeVersion {
// A map from the zcr_color_manager_v1 chromaticity_names enum values
// representing well-known chromaticities, to their equivalent PrimaryIDs.
// See components/exo/wayland/protocol/chrome-color-management.xml
-constexpr auto kChromaticityMap = base::MakeFixedFlatMap<
+const auto kChromaticityMap = base::MakeFixedFlatMap<
zcr_color_manager_v1_chromaticity_names,
PrimaryVersion>(
{{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE,
@@ -108,7 +108,7 @@ constexpr auto kChromaticityMap = base::MakeFixedFlatMap<
// A map from the zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent TransferIDs.
// See components/exo/wayland/protocol/chrome-color-management.xml
-constexpr auto kEotfMap = base::MakeFixedFlatMap<
+const auto kEotfMap = base::MakeFixedFlatMap<
zcr_color_manager_v1_eotf_names,
TransferVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
@@ -176,7 +176,7 @@ constexpr auto kEotfMap = base::MakeFixedFlatMap<
// A map from the SDR zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent transfer functions.
// See components/exo/wayland/protocol/chrome-color-management.xml
-constexpr auto kTransferMap =
+const auto kTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
@@ -196,7 +196,7 @@ constexpr auto kTransferMap =
// A map from the HDR zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent transfer functions.
// See components/exo/wayland/protocol/chrome-color-management.xml
-constexpr auto kHDRTransferMap =
+const auto kHDRTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>(
{{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
@@ -214,7 +214,7 @@ constexpr auto kHDRTransferMap =
// A map from zcr_color_manager_v1 matrix_names enum values to
// gfx::ColorSpace::MatrixIDs.
-constexpr auto kMatrixMap =
+const auto kMatrixMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>(
{{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB,
MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)},
@@ -251,7 +251,7 @@ constexpr auto kMatrixMap =
// A map from zcr_color_manager_v1 range_names enum values to
// gfx::ColorSpace::RangeIDs.
-constexpr auto kRangeMap =
+const auto kRangeMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>(
{{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED,
RangeVersion(gfx::ColorSpace::RangeID::LIMITED,
--
2.42.1
|