linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.24k stars 93 forks source link

Bump cairo #453

Closed JAicewizard closed 3 years ago

JAicewizard commented 3 years ago

This bumps cairo and friends to the latest version.

Once this is put in a release druid-shell should also be updated to match the versions.

JAicewizard commented 3 years ago

The text part of the piet-cairo doesnt seem to be handling errors either, but that should probably be another PR.

I would also like to remind you of //FIXME: replace this when pango 0.10.0 lands.

cmyr commented 3 years ago

@JAicewizard if you can confirm that this will work fine on gtk3 then I'm satisfied. :)

JAicewizard commented 3 years ago

This will requite the same bump on druid-shell, for all gtk-related deps. I tested this on my GTK4 branch using updated deps and that works, perfectly fine, I see no reason it wouldn't using GTK3. The rendering is the same after all.

I will create a branch with GTK3, you can merge now or wait for me to test on that.

cmyr commented 3 years ago

my main concern is whether the GTK3 that is bundled with most distributions has a dependency on a previous version of cairo.

JAicewizard commented 3 years ago

The new cairo-rs uses 1.14 by default. Even Ubuntu stable 16.04 supports this. For ubuntu you'd have to go back to 2014 to find a stable version that runs something older. 14.04 is technically still supported by Canonical, but only for Extended Security Maintenance. Not worth supporting IMO. Even the oldest of servers should have updated by now.

JAicewizard commented 3 years ago

I check all other dependencies and they all work back to 16.04 from what I can tell

JAicewizard commented 3 years ago

I just realised this probably isnt what you meant.

No the GTK and cairo should always work together, given they are bundled with the same OS/version. Even then, putting in your own cairo still shouldn't break it. These are all backwards compatible, so as long as you target the lowest version it should work for higher versions as well. We just link to whatever the distribution provides WRT GTK/cairo etc, and those should all match each other. I dont know if this happens at compile time or runtime, but either way the picked GTK3/cairo should always be compatible with each other.

As written in my last comment, we should be compatible with cairo all the way back to 2016, so we are wont run into any issues with this.