Skip to content

Commit

Permalink
Bug 1709440 - Fix the space mapping for WR glyphs r=gw
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed May 11, 2021
1 parent be0f391 commit ab58e1b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions webrender/src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1373,14 +1373,17 @@ impl BatchBuilder {
device_bounding_rect = device_bounding_rect.union(&device_glyph_rect);
}

let map_device_to_surface: SpaceMapper<DevicePixel, PicturePixel> = SpaceMapper::new_with_target(
surface_spatial_node_index,
let map_device_to_surface: SpaceMapper<PicturePixel, DevicePixel> = SpaceMapper::new_with_target(
root_spatial_node_index,
*bounding_rect,
surface_spatial_node_index,
device_bounding_rect,
ctx.spatial_tree,
);

map_device_to_surface.map(&device_bounding_rect)
match map_device_to_surface.unmap(&device_bounding_rect) {
Some(r) => r.intersection(&bounding_rect),
None => Some(*bounding_rect),
}
} else {
let mut local_bounding_rect = LayoutRect::default();

Expand Down

0 comments on commit ab58e1b

Please sign in to comment.