Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
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 Jul 10, 2020
cc827d6
Update html_image_codec.dart
deakjahn Jul 10, 2020
6b9fd73
rebase
deakjahn Jul 28, 2020
352b31a
Update image.dart
deakjahn Jul 10, 2020
4ea7ef2
Update picture.dart
deakjahn Jul 10, 2020
f99c8b2
Update picture.dart
deakjahn Jul 10, 2020
1e7188f
Update picture.dart
deakjahn Jul 10, 2020
4017e40
Update html_image_codec.dart
deakjahn Jul 10, 2020
ed811cf
Update image.dart
deakjahn Jul 10, 2020
d6dc410
Update image.dart
deakjahn Jul 12, 2020
c2c70e4
Revert
deakjahn Jul 23, 2020
8b1ed1a
Tested by local engine
deakjahn Jul 24, 2020
bad4d45
Add files via upload
deakjahn Jul 24, 2020
22dbcf7
Delete picture_to_image_test.dart
deakjahn Jul 24, 2020
5eb7b8a
Test #1
deakjahn Jul 25, 2020
1feae02
Test to read only
deakjahn Jul 26, 2020
4c9001b
Finally
deakjahn Jul 28, 2020
a2ff894
Sorry, spaces
deakjahn Jul 28, 2020
0c72496
Test, finally
deakjahn Jul 28, 2020
91b12ca
@JS refactoring
deakjahn Jul 28, 2020
9eeb7e0
@JS refactoring
deakjahn Jul 28, 2020
6efd763
SkData and SkImageInfo
deakjahn Jul 29, 2020
22d2f96
Unused items
deakjahn Jul 29, 2020
f1d49be
Test to write PNG
deakjahn Jul 29, 2020
6675e13
Remove comments
deakjahn Aug 4, 2020
ced934c
Add comments
deakjahn Aug 4, 2020
7b78b27
CK test
deakjahn Aug 4, 2020
11c4073
Comment about copying
deakjahn Aug 5, 2020
72ef505
Update image.dart
deakjahn Jul 10, 2020
1afe140
Update html_image_codec.dart
deakjahn Jul 10, 2020
18642e4
rebase
deakjahn Jul 28, 2020
a20d80d
Update image.dart
deakjahn Jul 10, 2020
e3147c5
Update picture.dart
deakjahn Jul 10, 2020
ae8ba90
Update picture.dart
deakjahn Jul 10, 2020
abf4f78
Update picture.dart
deakjahn Jul 10, 2020
2abe68f
Update html_image_codec.dart
deakjahn Jul 10, 2020
0b765d8
Update image.dart
deakjahn Jul 10, 2020
1109004
Update image.dart
deakjahn Jul 12, 2020
17a2ef5
Revert
deakjahn Jul 23, 2020
0c2aac9
Tested by local engine
deakjahn Jul 24, 2020
301ae90
Add files via upload
deakjahn Jul 24, 2020
fbfd675
Delete picture_to_image_test.dart
deakjahn Jul 24, 2020
b49583b
Test #1
deakjahn Jul 25, 2020
26a49fb
Test to read only
deakjahn Jul 26, 2020
b23ca62
Test, finally
deakjahn Jul 28, 2020
41d664a
@JS refactoring
deakjahn Jul 28, 2020
fcd1d2f
@JS refactoring
deakjahn Jul 28, 2020
a29069f
SkData and SkImageInfo
deakjahn Jul 29, 2020
83a7399
Unused items
deakjahn Jul 29, 2020
99eb64c
Test to write PNG
deakjahn Jul 29, 2020
4b28ee1
Remove comments
deakjahn Aug 4, 2020
10f4d4c
CK test
deakjahn Aug 4, 2020
70d9884
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn Aug 7, 2020
a1346ea
Rebase manually
deakjahn Aug 7, 2020
4e41dfc
Rebase manually
deakjahn Aug 7, 2020
fb02673
New test
deakjahn Aug 7, 2020
8c2790c
Newline
deakjahn Aug 7, 2020
6a31d41
Rebase dirt
deakjahn Aug 7, 2020
dc77edc
SkImageInfo
deakjahn Aug 7, 2020
54e706c
New test
deakjahn Aug 7, 2020
d4a07a1
New test
deakjahn Aug 7, 2020
6db0a3a
New test
deakjahn Aug 7, 2020
6daead7
Missing annotation
deakjahn Aug 7, 2020
75770e7
Rebase
deakjahn Aug 11, 2020
ad715e1
ColorSpace
deakjahn Aug 13, 2020
69dd265
SkImageInfo correct names
deakjahn Aug 13, 2020
078d6bc
SkImageInfo correct names
deakjahn Aug 13, 2020
5dd02dd
SkImageInfo correct names
deakjahn Aug 13, 2020
5f4d5e7
SkImageInfo properties
deakjahn Aug 13, 2020
107ba3d
Inactive test
deakjahn Aug 13, 2020
93cd91d
Merge remote-tracking branch 'upstream/master'
deakjahn Aug 19, 2020
69ec1cc
Unused import
deakjahn Aug 21, 2020
9d5a611
Merge remote-tracking branch 'upstream/master'
deakjahn Aug 23, 2020
6e1d95d
Squash 2
deakjahn Aug 23, 2020
7da3c86
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn Aug 23, 2020
90d0b69
Squash 2.
deakjahn Aug 23, 2020
4c39264
Merge branch 'master' of https://github.com/deakjahn/engine
deakjahn Aug 23, 2020
9cf68f8
Merge remote-tracking branch 'upstream/master'
deakjahn Aug 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/web_ui/lib/src/engine/compositor/canvaskit_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1705,14 +1705,14 @@ class SkImageInfo {
SkColorSpace colorSpace,
SkColorType colorType,
});
external SkAlphaType get alphaType();
external SkColorSpace get colorSpace();
external SkColorType get colorType();
external int get height();
external bool get isEmpty();
external bool get isOpaque();
external SkRect get bounds();
external int get width();
external SkAlphaType alphaType();
external SkColorSpace colorSpace();
external SkColorType colorType();
external int height();
external bool isEmpty();
external bool isOpaque();
external SkRect bounds();
external int width();
Copy link
Contributor

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 example external bool get isEmpty; (notice no () at the end).

Copy link
Contributor Author

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 ().

Copy link
Contributor

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 @JS bindings 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 between SkImageInfo constructed by JS and one returned by CanvasKit?

Why don't you do what works now, and we can clean this up later?

/cc @kjlubick

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

external SkImageInfo makeAlphaType(SkAlphaType alphaType);
external SkImageInfo makeColorSpace(SkColorSpace colorSpace);
external SkImageInfo makeColorType(SkColorType colorType);
Expand Down