Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

kjlubick
Copy link
Contributor

In https://skia-review.googlesource.com/c/skia/+/838417 Skia staged the removal of automatically creating an SkUnicode as part of the effort to make Skia more modular. Clients will now have to construct and SkUnicode and pass it to SkParagraph to provide the appropriate data. Flutter sometimes uses ICU and sometimes uses a "client" SkUnicode which makes use of the browser APIs to get the data.

We should come back to the skwasm code especially, because right now skwasm gets the data necessary to make an SkUnicode::Client, but stores it in the ParagraphBuilder, just to take it out again later to make the SkUnicode::Client and pass that back into the ParagraphBuilder. skwasm should just create the SkUnicode::Client directly and pass it to the ParagraphBuilder::make().

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Apr 12, 2024
hubot pushed a commit to google/skia that referenced this pull request Apr 15, 2024
Flutter uses the public interface and also need access to the getters.

See flutter/engine#52086

Change-Id: I84e2a09a65c63328ba20fee42a80cf851744cb14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/840000
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
@kjlubick kjlubick marked this pull request as ready for review April 23, 2024 23:25
@mdebbar
Copy link
Contributor

mdebbar commented Apr 29, 2024

I was expecting a similar change to our CanvasKit side too: https://github.com/flutter/engine/blob/main/lib/web_ui/lib/src/engine/canvaskit/text.dart#L1133

Is there a reason CanvasKit didn't require a change?

Also, I think @jason-simmons should take a look too.

@kjlubick
Copy link
Contributor Author

canvaskit did need changes, e.g. https://github.com/google/skia/blob/f7bfa8eef5b576b0d024216db7ee43353efc6ee3/modules/canvaskit/paragraph_bindings.cpp#L655-L660

However, the dart code you link shells out to CanvasKit, which didn't have any API changes (we hid those away).

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, the dart code you link shells out to CanvasKit, which didn't have any API changes (we hid those away).

Nice! Thanks for clarifying.

LGTM!

@kjlubick kjlubick merged commit 99de621 into flutter:main Apr 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 29, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 29, 2024
…147537)

flutter/engine@399837d...5165c71

2024-04-29 zanderso@users.noreply.github.com Remove references to goma (flutter/engine#52411)
2024-04-29 kjlubick@users.noreply.github.com Make SkUnicode explicitly instead of relying on SkParagraph to make it for us (flutter/engine#52086)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants