-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Add web support for FragmentProgram #37065
Conversation
| @override | ||
| SkShader createDefault() { | ||
| return MakeRuntimeEffect(source).makeShader(floats); | ||
| } | ||
|
|
||
| @override | ||
| SkShader resurrect() { | ||
| return MakeRuntimeEffect(source).makeShader(floats); | ||
| } |
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 really understand these APIs, I'm sure that I'm not using the correctly.
harryterkelsen
left a comment
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.
Please add some tests for RuntimeEffect in canvaskit_api_test.dart
jonahwilliams
left a comment
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.
There is a test that creates a RuntimeEffect object - but we don't ever support user supplied SkSL (and we never will). I could generate a small valid SkSL program locally and/or pull it out of an IPLR file to allow writing a test. Is that what you are looking for?
80baad3 to
e302781
Compare
|
Updated to use some simple SkSL programs and the RuntimeEffect API |
harryterkelsen
left a comment
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!
flutter/flutter#114121
Downloads and parses the JSON formatted IPLR file generated by the flutter tooling. Allows creating RuntimeEffect objects and associated fragment shader programs if this is defined on the canvaskit object