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
Remove comments
- Loading branch information
commit 4b28ee1c6fce0cdb0bcf96713a7e158376871e4f
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
|
|
||
| /// Bindings for CanvasKit JavaScript API. | ||
| /// | ||
| /// Prefer keeping the originl CanvasKit names so it is easier to locate | ||
| /// Prefer keeping the original CanvasKit names so it is easier to locate | ||
| /// the API behind these bindings in the Skia source code. | ||
|
|
||
| // @dart = 2.10 | ||
|
|
@@ -643,12 +643,6 @@ class SkAlphaType { | |
| external int get value; | ||
| } | ||
|
|
||
| // TODO final List<SkAlphaType> _skAlphaTypes = <SkAlphaType>[ | ||
| // canvasKit.AlphaType.Opaque, | ||
| // canvasKit.AlphaType.Premul, | ||
| // canvasKit.AlphaType.Unpremul, | ||
| //]; | ||
|
|
||
| @JS() | ||
| class SkColorTypeEnum { | ||
| external SkColorType get Alpha_8; | ||
|
|
@@ -669,20 +663,6 @@ class SkColorType { | |
| external int get value; | ||
| } | ||
|
|
||
| // TODO final List<SkColorType> _skColorTypes = <SkColorType>[ | ||
| // canvasKit.ColorType.Alpha_8, | ||
| // canvasKit.ColorType.RGB_565, | ||
| // canvasKit.ColorType.ARGB_4444, | ||
| // canvasKit.ColorType.RGBA_8888, | ||
| // canvasKit.ColorType.RGB_888x, | ||
| // canvasKit.ColorType.BGRA_8888, | ||
| // canvasKit.ColorType.RGBA_1010102, | ||
| // canvasKit.ColorType.RGB_101010x, | ||
| // canvasKit.ColorType.Gray_8, | ||
| // canvasKit.ColorType.RGBA_F16, | ||
| // canvasKit.ColorType.RGBA_F32, | ||
| //]; | ||
|
|
||
| @JS() | ||
| class SkAnimatedImage { | ||
| external int getFrameCount(); | ||
|
|
@@ -1719,7 +1699,6 @@ class SkImageInfo { | |
| external SkRect get Rect; | ||
| external int get RowBytes; | ||
| external int get RowBytes64; | ||
| // TODO external SkSize get Size; | ||
| external int get Width; | ||
| external factory SkImageInfo({ | ||
|
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. nit: Flutter style prefers putting factories and constructors above everything else. |
||
| required int width, | ||
|
|
||
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.
I think the field names above must exactly match the names in CanvasKit and in the factory below (for example "width" and "Width" is wrong; both should be "width").
Uh oh!
There was an error while loading. Please reload this page.
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.
Oops, I might have inadvertently stumbled upon the documentation of the arch-enemy. :-)