-
Notifications
You must be signed in to change notification settings - Fork 144
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
Update wgpu, Peniko, and Vello #741
Update wgpu, Peniko, and Vello #741
Conversation
724660e
to
680a9e9
Compare
This is a draft and not fully working yet (doesn't compile). The actual update of Vello isn't here yet until I finish up the changes for brush and gradient interpolation to at least get them to compile. |
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.
The bulk of the changes are quite dull.
- Color constants are referenced from
color::palette::css
rather than named constants on theColor
type. - Use
with_alpha
rather thanmultiply_alpha
since we're just using this to set the alpha. - Use
Color::from_rgb8
andColor::from_rgba8
rather thanColor::rgb8
andColor::rgba8
.
@@ -16,5 +16,5 @@ wgpu = { workspace = true } | |||
futures = "0.3.26" | |||
anyhow = "1.0.69" | |||
swash = "0.1.8" | |||
floem-vger-rs = { version = "0.3.1", package = "floem-vger" } | |||
floem-vger-rs = { git = "https://github.com/lapce/vger-rs.git", rev = "b2441cc85b1d555a3c74e2cdced08382460759df", version = "0.3.1", package = "floem-vger" } |
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.
This will need a release before this can land.
#[allow(clippy::type_complexity)] | ||
glyph_cache: HashMap<(CacheKey, Color), (CacheColor, Option<Rc<Glyph>>)>, | ||
glyph_cache: HashMap<(CacheKey, u32), (CacheColor, Option<Rc<Glyph>>)>, |
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.
With color
, the Color
(really AlphaColor<Srgb>
) is using f32
, so it isn't Hash
or Eq
. We have a way to work around this with a wrapper type, but since here we're just dropping down to u8 colors anyway, I thought this might be okay here. I'm not sure though.
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.
This looks like a good solution here.
680a9e9
to
59d7daa
Compare
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.
to this point all of these changes look good and I think it's fine to leave the gradient interpolation commented out
59d7daa
to
9583f31
Compare
Convert the code for solid/gradient interpolation.
9583f31
to
bc0b489
Compare
Thanks for doing this! It is very appreciated |
Update to Vello 0.4, Peniko 0.3.1, and wgpu 23.0.1. This brings with it the new
color
crate that Vello and Peniko use.This currently disables interpolation of gradients.