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

Conversation

@joshualitt
Copy link
Contributor

This is CL 6 in a series of CLs to migrate Flutter Web to the new JS static interop API.

This CL migrates more of canvaskit_api.dart(about 40% through that file). I stopped after SkPaint because it was a little more involved.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 7, 2022
@joshualitt
Copy link
Contributor Author

@srujzs ptal, this one is a bit more involved because of the replacement of a generative constructor with a factory constructor, but not by much.

@staticInterop
class SkPaint {
external SkPaint();
external factory SkPaint.create();
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we want a named factory? Named and unnamed factories get lowered to the same code anyways here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

soooo much better, must smaller diff now. ptal.

@srujzs
Copy link
Contributor

srujzs commented Apr 8, 2022

LGTM

@joshualitt joshualitt marked this pull request as ready for review April 8, 2022 21:12
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@joshualitt joshualitt requested review from eyebrowsoffire and yjbanov and removed request for yjbanov April 8, 2022 21:13
@Hixie
Copy link
Contributor

Hixie commented Apr 14, 2022

test-exempt: code refactor with no semantic change

@joshualitt joshualitt force-pushed the migrate_6 branch 2 times, most recently from 7a429b0 to f6e928e Compare April 14, 2022 19:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs tests platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants