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

Conversation

harryterkelsen
Copy link
Contributor

Description

Rolls CanvasKit to 0.22, bringing in various fixes.

Related Issues

Fixes flutter/flutter#70620

Tests

Updates canvaskit_api_test.dart for APIs that changed.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Reviewer Checklist

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change.

@@ -1269,6 +1292,27 @@ SkFloat32List toMallocedSkPoints(List<ui.Offset> points) {
return skPoints;
}

/// Converts a list of [ui.Offset] into a flat list of points.
Float32List toFlatSkPoints(List<ui.Offset> points) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need toSkPoints2d and rawPointsToSkPoints2d after this PR? Also, can we use toMallocedSkPoints instead to avoid double-copying the data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was unsure if that would mean we would have to free and re-malloc the positions whenever we delete the SkVertices. Since we only use it at once, at construction, I figured it wouldn't hurt performance to let CanvasKit do the Malloc.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

LGTM modulo comments, which are non-blocking if you already thought about those things.

lgtm

@chinmaygarde chinmaygarde added the platform-web Code specifically for the web engine label Jan 7, 2021
@harryterkelsen harryterkelsen merged commit 62a1e8e into flutter:master Jan 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 12, 2021
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rotated image on Flutter web with CanvasKit
5 participants