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] Support raw straight RGBA format in Image.toByteData() in Html #28357
Merged
fluttergithubbot
merged 3 commits into
flutter:master
from
ColdPaleLight:image_straight_rgba_html
Sep 23, 2021
Merged
[web] Support raw straight RGBA format in Image.toByteData() in Html #28357
fluttergithubbot
merged 3 commits into
flutter:master
from
ColdPaleLight:image_straight_rgba_html
Sep 23, 2021
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
8 tasks
80dae99
to
84ef623
Compare
dnfield
reviewed
Sep 15, 2021
@@ -172,18 +172,15 @@ class HtmlImage implements ui.Image { | |||
|
|||
@override | |||
Future<ByteData?> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) { | |||
if (format == ui.ImageByteFormat.rawRgba) { | |||
// TODO(ColdPaleLight): https://github.com/flutter/flutter/issues/89128 | |||
if (format == ui.ImageByteFormat.rawRgba || format == ui.ImageByteFormat.rawStraightRgba) { |
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: Please write this as a switch
statement, and update the comment to make it clear that we're always returning straight rather than premul. I thought we also had an issue to look at using webGL to do this?
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
dnfield
approved these changes
Sep 15, 2021
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
2ca489a
to
d990129
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 23, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yes
customer: alibaba
platform-web
Code specifically for the web engine
waiting for tree to go green
This PR is approved and tested, but waiting for the tree to be green to land.
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.
Fix issue : flutter/flutter#89094
Detail: #28339 (comment)
Pre-launch Checklist
writing and running engine tests.
///
).