-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[web] Remove image codecs from canvaskit_chromium #178133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This makes uploaded bits smaller, right? By how much? |
Yes, added the numbers to the PR description. It's ±100KB smaller.
This PR is a no-op for apps (other than making CanvasKit's size smaller). The web engine has been using the browser TL;DR: Flutter web apps today in Chrome are already not using the Skia decoders. This PR is removing the unused decoders to save size. |
harryterkelsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit
|
|
||
| void _imageTests() { | ||
| test('MakeAnimatedImageFromEncoded makes a non-animated image', () { | ||
| if (configuration.canvasKitVariant == CanvasKitVariant.chromium) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use skip: instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the first thing I tried :)
It doesn't work because the configuration object is initialized after skip is evaluated. The configuration value is initialized in a setUpAll callback, so the only reliable place to get the correct value of configuration.canvasKitVariant is inside the test body.
Fixes #122331