Replace SkColor with blink::Color in FontPalette [chromium/src : main]

0 views
Skip to first unread message

Munira Tursunova (Gerrit)

unread,
Jun 7, 2023, 1:24:03 PM6/7/23
to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org

Munira Tursunova uploaded patch set #2 to this change.

View Change

Replace SkColor with blink::Color in FontPalette

Using blink::Color instead of SkColor for blink's font-palette
representation. It is needed for the future modifications in the
palette-mix funciton, to be able to interpolate in different color
spaces, compare section "Mixing Palettes: the ‘palette-mix()’ Function"
of the Explainer:
https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing

Bug: 1400620
Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
---
M third_party/blink/renderer/core/css/style_rule_font_palette_values.cc
M third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
M third_party/blink/renderer/platform/fonts/font_palette.cc
M third_party/blink/renderer/platform/fonts/font_palette.h
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.h
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup_test.cc
M third_party/blink/renderer/platform/fonts/palette_interpolation.cc
M third_party/blink/renderer/platform/fonts/palette_interpolation.h
M third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc
10 files changed, 95 insertions(+), 103 deletions(-)

To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
Gerrit-Change-Number: 4597888
Gerrit-PatchSet: 2
Gerrit-Owner: Munira Tursunova <moo...@google.com>
Gerrit-CC: Alexis Menard <alexis...@intel.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>

Munira Tursunova (Gerrit)

unread,
Jun 7, 2023, 1:24:15 PM6/7/23
to Dominik Röttsches, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org

Attention is currently required from: Dominik Röttsches.

Munira Tursunova would like Dominik Röttsches to review this change.

View Change

Replace SkColor with blink::Color in FontPalette

Using blink::Color instead of SkColor for blink's font-palette
representation. It is needed for the future modifications in the
palette-mix funciton, to be able to interpolate in different color
spaces, compare section "Mixing Palettes: the ‘palette-mix()’ Function"
of the Explainer:
https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing

Bug: 1400620
Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
---
M third_party/blink/renderer/core/css/style_rule_font_palette_values.cc
M third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
M third_party/blink/renderer/platform/fonts/font_palette.cc
M third_party/blink/renderer/platform/fonts/font_palette.h
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.h
M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup_test.cc
M third_party/blink/renderer/platform/fonts/palette_interpolation.cc
M third_party/blink/renderer/platform/fonts/palette_interpolation.h
M third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc
10 files changed, 95 insertions(+), 103 deletions(-)


To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
Gerrit-Change-Number: 4597888
Gerrit-PatchSet: 2
Gerrit-Owner: Munira Tursunova <moo...@google.com>
Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
Gerrit-CC: Alexis Menard <alexis...@intel.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Dominik Röttsches <dr...@chromium.org>

Munira Tursunova (Gerrit)

unread,
Jun 9, 2023, 11:26:07 AM6/9/23
to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Chromium LUCI CQ, Dominik Röttsches, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

Attention is currently required from: Dominik Röttsches, Munira Tursunova.

Set Ready For Review

View Change

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 4
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Attention: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Jun 2023 15:25:59 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No

    Munira Tursunova (Gerrit)

    unread,
    Jun 9, 2023, 11:38:55 AM6/9/23
    to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org

    Attention is currently required from: Dominik Röttsches, Munira Tursunova.

    Munira Tursunova uploaded patch set #5 to this change.

    View Change

    Replace SkColor with blink::Color in FontPalette

    Using blink::Color instead of SkColor for blink's font-palette
    representation. It is needed for the future modifications in the
    palette-mix function, to be able to interpolate in different color

    spaces, compare section "Mixing Palettes: the ‘palette-mix()’ Function"
    of Explainer:

    https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing

    Bug: 1400620
    Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    ---
    M third_party/blink/renderer/core/css/style_rule_font_palette_values.cc
    M third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
    M third_party/blink/renderer/platform/fonts/font_palette.cc
    M third_party/blink/renderer/platform/fonts/font_palette.h
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.h
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup_test.cc
    M third_party/blink/renderer/platform/fonts/palette_interpolation.cc
    M third_party/blink/renderer/platform/fonts/palette_interpolation.h
    M third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc
    10 files changed, 145 insertions(+), 128 deletions(-)

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: newpatchset
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 5
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>

    Dominik Röttsches (Gerrit)

    unread,
    Jun 12, 2023, 7:07:04 AM6/12/23
    to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Munira Tursunova.

    View Change

    7 comments:

    • File third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc:

      • Patch Set #6, Line 34: #include <cstdlib>

        What do you need that for?

      • Patch Set #6, Line 250:

                SkFontArguments::Palette::Override* sk_overrides =
        new SkFontArguments::Palette::Override[color_overrides.size()];

        I think this will leak, which is why luckily the `makeClone()` call works below.

        Allocate a new array into a `unique_ptr` that is declared at the same scope as the call to `makeClone()`. If you'd allocate as `unique_ptr` inside the `if` statement, this would go out of scope.

        For example, in lline 245:
        `std::unique_ptr<SkFontArguments::Palette::Override[]> skia_overrides;`

        then in the `if` block:
        `skia_overrides.reset(new SkFontArguments::Palette::Override[color_overrides.size()]);`

      • Patch Set #6, Line 252: for (wtf_size_t i = 0; i < color_overrides.size(); i++) {

        Consider moving the conversion to a helper function in an anonymous namespace.

      • Patch Set #6, Line 254: *(sk_overrides + i)

        how about `sk_overrides[i]`?

      • Patch Set #6, Line 256: sk_palette.overrides = std::move(sk_overrides);

        SkFontArguments::Palette::overrides is not an owning pointer, so the `move` here has the desired effect of passing ownership, see above.

        `SkFontArguments` is intended as a transient struct only for passing parameters to `makeClone()`. It doesn't own anything and references allocated arrays only outside itself.

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • Patch Set #6, Line 58: CheckColorsEqualityInSRGB

        Perhaps `ExpectColorsEqualInSRGB()`.

      • Patch Set #6, Line 66: color1.ConvertToColorSpace(blink::Color::ColorSpace::kSRGB);

        Do you need the color space conversions? Does the `Color` class, have some comparison methods independent of color space?

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 6
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Comment-Date: Mon, 12 Jun 2023 11:06:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No

    Munira Tursunova (Gerrit)

    unread,
    Jun 13, 2023, 5:30:36 AM6/13/23
    to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Tricium, Chromium LUCI CQ, Dominik Röttsches, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Dominik Röttsches.

    View Change

    7 comments:

    • File third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc:

      • Sorry, didn't noticed it and yes, we don't need it.

      • Patch Set #6, Line 250:

                SkFontArguments::Palette::Override* sk_overrides =
        new SkFontArguments::Palette::Override[color_overrides.size()];

      • I think this will leak, which is why luckily the `makeClone()` call works below. […]

        Added `unique_ptr`, thanks for explaining.

      • Patch Set #6, Line 252: for (wtf_size_t i = 0; i < color_overrides.size(); i++) {

        Consider moving the conversion to a helper function in an anonymous namespace.

      • Moved to ConvertPaletteOverridesToSkiaOverrides()

      • Right,thanks!

      • SkFontArguments::Palette::overrides is not an owning pointer, so the `move` here has the desired eff […]

        Thanks, fixed

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • Right, thanks!

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 8
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 09:30:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Dominik Röttsches <dr...@chromium.org>

    Dominik Röttsches (Gerrit)

    unread,
    Jun 13, 2023, 6:49:33 AM6/13/23
    to Anders Hartvoll Ruud, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Munira Tursunova

    Attention is currently required from: Anders Hartvoll Ruud, Munira Tursunova.

    Dominik Röttsches would like Anders Hartvoll Ruud to review this change authored by Munira Tursunova.

    View Change

    Replace SkColor with blink::Color in FontPalette

    Using blink::Color instead of SkColor for blink's font-palette
    representation. It is needed for the future modifications in the
    palette-mix function, to be able to interpolate in different color
    spaces, compare section "Mixing Palettes: the ‘palette-mix()’ Function"
    of Explainer:
    https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing

    Bug: 1400620
    Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    ---
    M third_party/blink/renderer/core/css/style_rule_font_palette_values.cc
    M third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
    M third_party/blink/renderer/platform/fonts/font_palette.cc
    M third_party/blink/renderer/platform/fonts/font_palette.h
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.h
    M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup_test.cc
    M third_party/blink/renderer/platform/fonts/palette_interpolation.cc
    M third_party/blink/renderer/platform/fonts/palette_interpolation.h
    M third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc
    10 files changed, 152 insertions(+), 128 deletions(-)


    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: newchange
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 8
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>

    Dominik Röttsches (Gerrit)

    unread,
    Jun 13, 2023, 6:49:37 AM6/13/23
    to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Anders Hartvoll Ruud, Munira Tursunova.

    View Change

    4 comments:

    • Patchset:

      • Patch Set #8:

        platform/fonts looks almost ready from my point of view with a suggestion to edit the comparison based, see below. Adding Anders for the CSS side.

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • Patch Set #8, Line 15: #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

        IWYU: Add #include "third_party/blink/renderer/platform/graphics/color.h"

      • Patch Set #8, Line 25: kEpsilon2

        Once you use `DifferenceSquared(const Color&, const Color&)` I would not call that epsilon anymore but give it a new name.

      • Patch Set #8, Line 68: EXPECT_EQ(color1.GetColorSpace(), color2.GetColorSpace());

        See `DifferenceSquared(const Color&, const Color&)`, can you work with that?

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 8
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 10:49:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No

    Munira Tursunova (Gerrit)

    unread,
    Jun 13, 2023, 7:48:04 AM6/13/23
    to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Tricium, Chromium LUCI CQ, Dominik Röttsches, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Anders Hartvoll Ruud, Dominik Röttsches.

    View Change

    3 comments:

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • IWYU: Add #include "third_party/blink/renderer/platform/graphics/color. […]

        Done

      • Patch Set #8, Line 68: EXPECT_EQ(color1.GetColorSpace(), color2.GetColorSpace());

        See `DifferenceSquared(const Color&, const Color&)`, can you work with that?

      • It doesn't include the difference between alpha parameter, I think it's better to check alpha as well, look at the test "MixScaledAndAddedPalettes" there we modify the alpha parameter.
        I guess I can use this method, but we don't actually need epsilon comparison here, we need it only for alpha parameter, since Red(), Green() and Blue() are ints.

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 9
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Attention: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 11:47:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Dominik Röttsches <dr...@chromium.org>

    Dominik Röttsches (Gerrit)

    unread,
    Jun 13, 2023, 7:50:24 AM6/13/23
    to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Anders Hartvoll Ruud, Munira Tursunova.

    View Change

    1 comment:

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • Patch Set #8, Line 68: EXPECT_EQ(color1.GetColorSpace(), color2.GetColorSpace());

        It doesn't include the difference between alpha parameter, I think it's better to check alpha as wel […]

        Then how about extracting the alpha parameters from the two colors, comparing those, then overriding them and using the `operator==()` comparison of color for the rest?

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 9
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 11:50:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Munira Tursunova <moo...@google.com>
    Comment-In-Reply-To: Dominik Röttsches <dr...@chromium.org>

    Munira Tursunova (Gerrit)

    unread,
    Jun 13, 2023, 7:57:25 AM6/13/23
    to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Tricium, Chromium LUCI CQ, Dominik Röttsches, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Anders Hartvoll Ruud, Dominik Röttsches.

    View Change

    1 comment:

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • Then how about extracting the alpha parameters from the two colors, comparing those, then overriding […]

        `operator==` compares `Param1()`, `Param2`, etc, but they are float values, after conversion from one space to another we might loose in precision, so we need to compare `Param1()`, `Param0()`, etc. with epsilon comparison, but `operator==` uses just regular comparison without epsilon.

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 9
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Attention: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 11:57:17 +0000

    Dominik Röttsches (Gerrit)

    unread,
    Jun 13, 2023, 8:01:47 AM6/13/23
    to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Anders Hartvoll Ruud, Munira Tursunova.

    Patch set 9:Code-Review +1

    View Change

    1 comment:

    • File third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc:

      • `operator==` compares `Param1()`, `Param2`, etc, but they are float values, after conversion from on […]

        Ah, so you're combining the two now `DifferenceSquared` and a separate alpha comparison, that looks good then. Thanks for the explanations.

    To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
    Gerrit-Change-Number: 4597888
    Gerrit-PatchSet: 9
    Gerrit-Owner: Munira Tursunova <moo...@google.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
    Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Munira Tursunova <moo...@google.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jun 2023 12:01:40 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes

    Anders Hartvoll Ruud (Gerrit)

    unread,
    Jun 14, 2023, 4:52:00 AM6/14/23
    to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Dominik Röttsches, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

    Attention is currently required from: Munira Tursunova.

    Patch set 9:Code-Review +1

    View Change

      To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
      Gerrit-Change-Number: 4597888
      Gerrit-PatchSet: 9
      Gerrit-Owner: Munira Tursunova <moo...@google.com>
      Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
      Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
      Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Attention: Munira Tursunova <moo...@google.com>
      Gerrit-Comment-Date: Wed, 14 Jun 2023 08:51:51 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes

      Munira Tursunova (Gerrit)

      unread,
      Jun 14, 2023, 8:32:41 AM6/14/23
      to apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Dominik Röttsches, Tricium, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

      Patch set 9:Commit-Queue +2

      View Change

        To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
        Gerrit-Change-Number: 4597888
        Gerrit-PatchSet: 9
        Gerrit-Owner: Munira Tursunova <moo...@google.com>
        Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
        Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
        Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
        Gerrit-CC: Alexis Menard <alexis...@intel.com>
        Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
        Gerrit-CC: Stephen Chenney <sche...@chromium.org>
        Gerrit-Comment-Date: Wed, 14 Jun 2023 12:32:30 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes

        Chromium LUCI CQ (Gerrit)

        unread,
        Jun 14, 2023, 8:40:27 AM6/14/23
        to Munira Tursunova, apavlo...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, pdr+graphi...@chromium.org, Anders Hartvoll Ruud, Dominik Röttsches, Tricium, Alexis Menard, chromium...@chromium.org, Dirk Schulze, Stephen Chenney

        Chromium LUCI CQ submitted this change.

        View Change

        Approvals: Anders Hartvoll Ruud: Looks good to me Munira Tursunova: Commit Dominik Röttsches: Looks good to me
        Replace SkColor with blink::Color in FontPalette

        Using blink::Color instead of SkColor for blink's font-palette
        representation. It is needed for the future modifications in the
        palette-mix function, to be able to interpolate in different color
        spaces, compare section "Mixing Palettes: the ‘palette-mix()’ Function"
        of Explainer:
        https://docs.google.com/document/d/1XMTrKH003KBOes6hxzI-3E7LTwp5YwFC-rnzoFpFrfw/edit?usp=sharing

        Bug: 1400620
        Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
        Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4597888
        Reviewed-by: Anders Hartvoll Ruud <and...@chromium.org>
        Reviewed-by: Dominik Röttsches <dr...@chromium.org>
        Commit-Queue: Munira Tursunova <moo...@google.com>
        Cr-Commit-Position: refs/heads/main@{#1157468}

        ---
        M third_party/blink/renderer/core/css/style_rule_font_palette_values.cc
        M third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
        M third_party/blink/renderer/platform/fonts/font_palette.cc
        M third_party/blink/renderer/platform/fonts/font_palette.h
        M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
        M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.h
        M third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup_test.cc
        M third_party/blink/renderer/platform/fonts/palette_interpolation.cc
        M third_party/blink/renderer/platform/fonts/palette_interpolation.h
        M third_party/blink/renderer/platform/fonts/palette_interpolation_test.cc
        10 files changed, 149 insertions(+), 128 deletions(-)


        To view, visit change 4597888. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I08e33f6dbe4d1cad1506b1e0dea299c20f6ea380
        Gerrit-Change-Number: 4597888
        Gerrit-PatchSet: 10
        Gerrit-Owner: Munira Tursunova <moo...@google.com>
        Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Dominik Röttsches <dr...@chromium.org>
        Gerrit-Reviewer: Munira Tursunova <moo...@google.com>
        Gerrit-CC: Alexis Menard <alexis...@intel.com>
        Reply all
        Reply to author
        Forward
        0 new messages