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
Image.toByteData and Picture.toImage implementations (#2) #20326
Closed
Closed
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
93e3f0b
Update image.dart
deakjahn cc827d6
Update html_image_codec.dart
deakjahn 6b9fd73
rebase
deakjahn 352b31a
Update image.dart
deakjahn 4ea7ef2
Update picture.dart
deakjahn f99c8b2
Update picture.dart
deakjahn 1e7188f
Update picture.dart
deakjahn 4017e40
Update html_image_codec.dart
deakjahn ed811cf
Update image.dart
deakjahn d6dc410
Update image.dart
deakjahn c2c70e4
Revert
deakjahn 8b1ed1a
Tested by local engine
deakjahn bad4d45
Add files via upload
deakjahn 22dbcf7
Delete picture_to_image_test.dart
deakjahn 5eb7b8a
Test #1
deakjahn 1feae02
Test to read only
deakjahn 4c9001b
Finally
deakjahn a2ff894
Sorry, spaces
deakjahn 0c72496
Test, finally
deakjahn 91b12ca
@JS refactoring
deakjahn 9eeb7e0
@JS refactoring
deakjahn 6efd763
SkData and SkImageInfo
deakjahn 22d2f96
Unused items
deakjahn f1d49be
Test to write PNG
deakjahn 6675e13
Remove comments
deakjahn ced934c
Add comments
deakjahn 7b78b27
CK test
deakjahn 11c4073
Comment about copying
deakjahn 72ef505
Update image.dart
deakjahn 1afe140
Update html_image_codec.dart
deakjahn 18642e4
rebase
deakjahn a20d80d
Update image.dart
deakjahn e3147c5
Update picture.dart
deakjahn ae8ba90
Update picture.dart
deakjahn abf4f78
Update picture.dart
deakjahn 2abe68f
Update html_image_codec.dart
deakjahn 0b765d8
Update image.dart
deakjahn 1109004
Update image.dart
deakjahn 17a2ef5
Revert
deakjahn 0c2aac9
Tested by local engine
deakjahn 301ae90
Add files via upload
deakjahn fbfd675
Delete picture_to_image_test.dart
deakjahn b49583b
Test #1
deakjahn 26a49fb
Test to read only
deakjahn b23ca62
Test, finally
deakjahn 41d664a
@JS refactoring
deakjahn fcd1d2f
@JS refactoring
deakjahn a29069f
SkData and SkImageInfo
deakjahn 83a7399
Unused items
deakjahn 99eb64c
Test to write PNG
deakjahn 4b28ee1
Remove comments
deakjahn 10f4d4c
CK test
deakjahn 70d9884
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn a1346ea
Rebase manually
deakjahn 4e41dfc
Rebase manually
deakjahn fb02673
New test
deakjahn 8c2790c
Newline
deakjahn 6a31d41
Rebase dirt
deakjahn dc77edc
SkImageInfo
deakjahn 54e706c
New test
deakjahn d4a07a1
New test
deakjahn 6db0a3a
New test
deakjahn 6daead7
Missing annotation
deakjahn 75770e7
Rebase
deakjahn ad715e1
ColorSpace
deakjahn 69dd265
SkImageInfo correct names
deakjahn 078d6bc
SkImageInfo correct names
deakjahn 5dd02dd
SkImageInfo correct names
deakjahn 5f4d5e7
SkImageInfo properties
deakjahn 107ba3d
Inactive test
deakjahn 93cd91d
Merge remote-tracking branch 'upstream/master'
deakjahn 69ec1cc
Unused import
deakjahn 9d5a611
Merge remote-tracking branch 'upstream/master'
deakjahn 6e1d95d
Squash 2
deakjahn 7da3c86
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn 90d0b69
Squash 2.
deakjahn 4c39264
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn 9cf68f8
Merge remote-tracking branch 'upstream/master'
deakjahn 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
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.
These should be getters I imagine. However, getters don't need the
(), for exampleexternal bool get isEmpty;(notice no()at the end).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.
I don't know any more. The doc I finally found explicitely says they are functions, using ().
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.
Hmm. Interesting. According to the
@JSbindings it's a plain object (in JS you'd write{ width: x, height: y, aphaType: z, colorSpace: a, colorType: b }). Perhaps there's a difference betweenSkImageInfoconstructed by JS and one returned by CanvasKit?Why don't you do what works now, and we can clean this up later?
/cc @kjlubick
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.
According to CanvasKit bindings it should be a POJO: https://github.com/google/skia/blob/1d4b92d87806e0d3ed8b4155da98d7d0ac757bd6/modules/canvaskit/canvaskit_bindings.cpp#L1873
That is, there shouldn't be any methods/functions on
SkImageInfo, only properties.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 is correct, the SkImageInfo is just a POJO
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.
OK, I do, I do.