Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove piet API and replace with scene fragments #190

Merged
merged 25 commits into from
Oct 19, 2022
Merged

Conversation

dfrg
Copy link
Collaborator

@dfrg dfrg commented Aug 12, 2022

This PR removes the dependency on the piet crate and replaces it with piet-scene. It also includes some renaming of types and reorganization of the scene crate to provide a more ergonomic API. Some more work is probably necessary here, certainly with regard to documentation.

The swash dependency is also removed and very simple text support has been added (based on piet-scene/moscato) to support rendering info strings.

Finally, gradient ramp caching is moved back to piet-gpu and handled during scene upload. This has the side effect of making the Scene and SceneFragment types nearly identical. It's worth discussing whether it makes sense to retain the distinct types.

Removes the dependency on the piet crate and replaces all uses with the scene crate.  Also does some cleanup of the scene API, renaming some types and moving them all to the crate root for better ergonomics.
Removes ResourceContext type. This makes scenes and fragments nearly identical. Should they be merged?
@dfrg dfrg changed the title Api2 Remove piet API and replace with scene fragments Aug 12, 2022
dfrg and others added 8 commits August 16, 2022 14:52
Removes the transform state mutator from SceneBuilder and adds transform parameters to push_layer, fill and stroke methods.
* Fix call to removed encoded_scene method in pgpu-render
* Add new ImageFormat::Surface variant to select a pixel format that matches the platform specific surface format. This makes gradients consistent across platforms.
Update various dependencies to latest.
Follow API changes introduced by ash, ash_window, and raw_window_handle.
Also updates ash_window to 0.12.

Note: this doesn't fix the android client.
Updates the android example to use latest ash plumbing.
Co-authored-by: m-hugo <56653363+m-hugo@users.noreply.github.com>
Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

I took a quick pass over this. We should definitely get it merged, as there's about to be a bunch of activity, and already there are merge conflicts (hopefully will be simple to resolve).

Removes the dependency on the piet crate and replaces all uses with the scene crate.  Also does some cleanup of the scene API, renaming some types and moving them all to the crate root for better ergonomics.
Removes ResourceContext type. This makes scenes and fragments nearly identical. Should they be merged?
Removes the transform state mutator from SceneBuilder and adds transform parameters to push_layer, fill and stroke methods.
* Fix call to removed encoded_scene method in pgpu-render
* Add new ImageFormat::Surface variant to select a pixel format that matches the platform specific surface format. This makes gradients consistent across platforms.
@dfrg dfrg merged commit 4edea5f into linebender:dev Oct 19, 2022
@bzm3r
Copy link
Contributor

bzm3r commented Oct 20, 2022

Nice!

@dfrg dfrg deleted the api2 branch October 20, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants