Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Oct 27, 2022

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

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Oct 27, 2022
Comment on lines 373 to 381
@override
SkShader createDefault() {
return MakeRuntimeEffect(source).makeShader(floats);
}

@override
SkShader resurrect() {
return MakeRuntimeEffect(source).makeShader(floats);
}
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 really understand these APIs, I'm sure that I'm not using the correctly.

@jonahwilliams jonahwilliams changed the title [WIP] Add web support for FragmentProgram [web] Add web support for FragmentProgram Oct 31, 2022
@jonahwilliams jonahwilliams marked this pull request as ready for review October 31, 2022 18:02
Copy link
Contributor

@harryterkelsen harryterkelsen left a 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

Copy link
Contributor Author

@jonahwilliams jonahwilliams left a 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?

@jonahwilliams
Copy link
Contributor Author

Updated to use some simple SkSL programs and the RuntimeEffect API

Copy link
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants