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

refactor: update piet, cairo, gtk based deps, switch to new glib::clone macro syntax #1218

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

flxzt
Copy link
Owner

@flxzt flxzt commented Sep 15, 2024

This bumps glib, cairo, glib, .. gtk based dependencies to the latest version.

In order to do that, we have to patch piet with the unfortunately not yet merged pango-cairo branch.

After doing so, there were some minor adjustments to the code needed to compile and adapt to the new API. The most prominent change is that all uses of the glib::clone macro are ported to the new syntax which enables code formatting and integrates better with rust-analyzer (reference renaming, warnings when references are unused!)

@RayJW
Copy link
Contributor

RayJW commented Sep 15, 2024

Although it might be worth opening a new issue or discussion for this, at what point might it be worth looking into slowly trying to branch into a vello (or similar for that matter) port? It looks like piet might not see a new (feature) release ever, so things like this might just become more tedious as time goes on.

@Doublonmousse
Copy link
Collaborator

@RayJW Not before we manage to make the gpu part work. For this to work we need to find a way to make wgpu work inside of a gtk window.

And for now this is not solved. There may be a way on 4.14 (and 4.16) using dma buf and the graphics offload but that's only supported on linux wayland (but maybe other in the future).

See gtk-rs/gtk4-rs#1278
Also https://github.com/Doublonmousse/wgpu-dma-buf (maybe it works, still some work to do, and on open gl es, not vulkan). In this case, any help is welcome !

@RayJW
Copy link
Contributor

RayJW commented Sep 16, 2024

@RayJW Not before we manage to make the gpu part work. For this to work we need to find a way to make wgpu work inside of a gtk window.

And for now this is not solved. There may be a way on 4.14 (and 4.16) using dma buf and the graphics offload but that's only supported on linux wayland (but maybe other in the future).

See gtk-rs/gtk4-rs#1278 Also Doublonmousse/wgpu-dma-buf (maybe it works, still some work to do, and on open gl es, not vulkan). In this case, any help is welcome !

Thanks for the insight! That's why I asked, I just stumbled upon the same issues with piet, hence discovering its deprecation. But I see there is still some work left to get rid of piet. It might probably still be some time before requiring 4.16 is viable.

Cargo.toml Outdated Show resolved Hide resolved
@flxzt
Copy link
Owner Author

flxzt commented Sep 16, 2024

I can't reasonably ask anyone to review all code changes in this PR, so I'll just be optimistic and merge

@flxzt flxzt merged commit 05f275a into main Sep 16, 2024
2 checks passed
@flxzt flxzt deleted the fz/bump-piet-cairo-gtk-deps branch September 16, 2024 18:42
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.

4 participants