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
[canvaskit] Refactor HtmlImageCodec to generalize to different renderers #52905
Merged
harryterkelsen
merged 5 commits into
flutter:main
from
harryterkelsen:image-decode-using-img
May 20, 2024
Merged
[canvaskit] Refactor HtmlImageCodec to generalize to different renderers #52905
harryterkelsen
merged 5 commits into
flutter:main
from
harryterkelsen:image-decode-using-img
May 20, 2024
Conversation
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
yjbanov
approved these changes
May 20, 2024
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.
final bool _supportsDecode = _jsImageDecodeFunction != null; | ||
|
||
// TODO(mdebbar): Deprecate this and remove it. | ||
// https://github.com/flutter/flutter/issues/127395 | ||
typedef WebOnlyImageCodecChunkCallback = ui_web.ImageCodecChunkCallback; | ||
|
||
class HtmlCodec implements ui.Codec { | ||
HtmlCodec(this.src, {this.chunkCallback}); | ||
abstract class HTMLImageElementCodec implements ui.Codec { |
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.
nit: I think the style guide prefers Html
rather than HTML
.
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.
Done
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 21, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
May 21, 2024
…148766) flutter/engine@c2ef01f...8a352f0 2024-05-21 skia-flutter-autoroll@skia.org Roll Skia from c6bb2106c13b to e0881f06f94a (1 revision) (flutter/engine#52954) 2024-05-21 skia-flutter-autoroll@skia.org Roll Dart SDK from cb763e4dad50 to dd768e0d1890 (1 revision) (flutter/engine#52953) 2024-05-21 skia-flutter-autoroll@skia.org Roll Skia from 2102f791405c to c6bb2106c13b (1 revision) (flutter/engine#52952) 2024-05-21 skia-flutter-autoroll@skia.org Roll Skia from 1a52d4d5f45e to 2102f791405c (1 revision) (flutter/engine#52951) 2024-05-21 skia-flutter-autoroll@skia.org Roll Skia from 97d3b45d6b00 to 1a52d4d5f45e (1 revision) (flutter/engine#52947) 2024-05-21 skia-flutter-autoroll@skia.org Roll Dart SDK from d1a786ef6888 to cb763e4dad50 (1 revision) (flutter/engine#52950) 2024-05-21 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.13.4 to 3.25.6 (flutter/engine#52949) 2024-05-21 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.5 to 4.1.6 (flutter/engine#52948) 2024-05-21 skia-flutter-autoroll@skia.org Roll Skia from 62f369c75994 to 97d3b45d6b00 (1 revision) (flutter/engine#52946) 2024-05-21 skia-flutter-autoroll@skia.org Roll Dart SDK from 01a77883e9e9 to d1a786ef6888 (1 revision) (flutter/engine#52945) 2024-05-21 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from jXE7fqJI6VWFMaIdV... to HHwlAJN5imwf3yX4i... (flutter/engine#52944) 2024-05-21 bdero@google.com [Impeller] Reland: Remove Entity capture/AiksInspector. (flutter/engine#52932) 2024-05-20 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Refactor HtmlImageCodec to generalize to different renderers (flutter/engine#52905) 2024-05-20 skia-flutter-autoroll@skia.org Roll Skia from 977a43773f7c to 62f369c75994 (1 revision) (flutter/engine#52941) 2024-05-20 skia-flutter-autoroll@skia.org Roll Skia from 0b8d8ce44d1f to 977a43773f7c (1 revision) (flutter/engine#52938) 2024-05-20 jonahwilliams@google.com [Impeller] write glyphs to malloc buffer. (flutter/engine#52937) 2024-05-20 skia-flutter-autoroll@skia.org Roll Dart SDK from 08f4324c988b to 01a77883e9e9 (1 revision) (flutter/engine#52936) 2024-05-20 bdero@google.com [Impeller] Fix use-after-move in SwapchainVK. (flutter/engine#52933) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from jXE7fqJI6VWF to HHwlAJN5imwf 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 jonahwilliams@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.
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.
Refactor
HtmlImageCodec
to decouple it from the html renderer so other renderers can create aui.Image
viaImage.decode()
.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.