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