This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Remove image codecs from Canvaskit Chromium #40309
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
08e97bf
[web] Remove image codecs from Canvaskit Chromium
mdebbar ac14b78
Merge branch 'main' into image_codecs
mdebbar 453f300
update browser detection
mdebbar e875ac0
tests for browser detection
mdebbar f24f10d
review comments
mdebbar 79c6490
Merge branch 'main' into image_codecs
mdebbar 56dccbe
make it a getter to fix tests
mdebbar 828331f
Merge branch 'main' into image_codecs
mdebbar 43aae6a
renames
mdebbar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -618,6 +618,8 @@ def to_gn_wasm_args(args, gn_args): | |
| gn_args['skia_use_webgpu'] = False | ||
| gn_args['skia_use_libheif'] = False | ||
| gn_args['skia_use_libjpeg_turbo_encode'] = False | ||
| # TODO(yjbanov): https://github.com/flutter/flutter/issues/122759 | ||
| # Remove this and implement it through Canvas2d. | ||
| gn_args['skia_use_libpng_encode'] = True | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please file an issue to remove this as well? We can implement this by piping the image through a 2D canvas. |
||
| gn_args['skia_use_libwebp_encode'] = False | ||
| gn_args['skia_use_lua'] = False | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Complete nitpick, but I don't like the name of this variable. On its face, the name seems to imply the opposite of what it does. If something called
ProtectFromImageDecoderIncompatibilitiesis true, I would think that means that you are protecting from incompatibilities, and if it's false, I would think you would not be protecting from incompatibilities. In general, either way, the name is a bit confusing as a name of a boolean. Might I suggest something like_kImageDecoderIsStableor_kImageDecoderIsBlessedor something like that?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.
Agreed. I also removed the
kprefix since these are getters and not consts anymore.