Bump euclid to 0.22

- Also updates raqote to latest with an upgrade of font-kit to 0.11
  applied on as a patch
- Update lyon_geom to the latest version

Major change:

- All matrices are now stored in row major order. This means that
  parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
  so `then()` is used and the order of operations changed.
This commit is contained in:
Martin Robinson 2023-01-16 17:46:27 +01:00
parent 4f355f5877
commit 423cc34cb0
56 changed files with 233 additions and 220 deletions

View file

@ -21,7 +21,7 @@ byteorder = "1"
canvas_traits = { path = "../canvas_traits" }
crossbeam-channel = "0.4"
cssparser = "0.29"
euclid = "0.20"
euclid = "0.22"
font-kit = "0.11"
fnv = "1.0"
gfx = { path = "../gfx" }
@ -29,7 +29,7 @@ gleam = "0.12"
half = "1"
ipc-channel = "0.14"
log = "0.4"
lyon_geom = "0.14"
lyon_geom = "1.0.4"
num-traits = "0.2"
pathfinder_geometry = "0.5"
pixels = { path = "../pixels" }
@ -40,8 +40,8 @@ sparkle = "0.1.25"
style = { path = "../style" }
style_traits = { path = "../style_traits" }
# NOTE: the sm-angle feature only enables angle on windows, not other platforms!
surfman = { version = "0.4", features = ["sm-angle","sm-angle-default"] }
surfman-chains = "0.6"
surfman = { version = "0.5", features = ["sm-angle","sm-angle-default"] }
surfman-chains = "0.7"
surfman-chains-api = "0.2"
time = { version = "0.1.41", optional = true }
webrender = { git = "https://github.com/servo/webrender" }

View file

@ -1213,9 +1213,9 @@ impl<'a> CanvasData<'a> {
),
self.drawtarget.get_format(),
);
let matrix = Transform2D::identity()
.pre_translate(-source_rect.origin.to_vector().cast::<f32>())
.pre_transform(&self.state.transform);
let matrix = self.state.transform.then(
&Transform2D::identity().pre_translate(-source_rect.origin.to_vector().cast::<f32>()),
);
draw_target.set_transform(&matrix);
draw_target
}
@ -1224,7 +1224,7 @@ impl<'a> CanvasData<'a> {
where
F: FnOnce(&mut dyn GenericDrawTarget),
{
let shadow_src_rect = self.state.transform.transform_rect(rect);
let shadow_src_rect = self.state.transform.outer_transformed_rect(rect);
let mut new_draw_target = self.create_draw_target_for_shadow(&shadow_src_rect);
draw_shadow_source(&mut *new_draw_target);
self.drawtarget.draw_surface_with_shadow(

View file

@ -445,8 +445,8 @@ impl GenericDrawTarget for raqote::DrawTarget {
Repetition::NoRepeat,
));
let transform =
raqote::Transform::create_translation(-dest.origin.x as f32, -dest.origin.y as f32)
.post_scale(
raqote::Transform::translation(-dest.origin.x as f32, -dest.origin.y as f32)
.then_scale(
image.width as f32 / dest.size.width as f32,
image.height as f32 / dest.size.height as f32,
);

View file

@ -606,7 +606,7 @@ impl WebGLThread {
let size = clamp_viewport(&gl, requested_size);
if safe_size != size {
debug!("Resizing swap chain from {} to {}", safe_size, size);
debug!("Resizing swap chain from {:?} to {:?}", safe_size, size);
swap_chain
.resize(&mut self.device, &mut ctx, size.to_i32())
.map_err(|err| format!("Failed to resize swap chain: {:?}", err))?;