mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Switch Arc<Box<Image>> to Arc<Image> for perf boost.
Image used to be a trait, but no longer is, so boxing it is no longer necessary.
This commit is contained in:
parent
a8b0fb1e79
commit
5b593a3d32
7 changed files with 13 additions and 13 deletions
|
@ -833,7 +833,7 @@ pub enum TextOrientation {
|
|||
#[derive(Clone)]
|
||||
pub struct ImageDisplayItem {
|
||||
pub base: BaseDisplayItem,
|
||||
pub image: Arc<Box<Image>>,
|
||||
pub image: Arc<Image>,
|
||||
|
||||
/// The dimensions to which the image display item should be stretched. If this is smaller than
|
||||
/// the bounds of this display item, then the image will be repeated in the appropriate
|
||||
|
|
|
@ -129,7 +129,7 @@ impl<'a> PaintContext<'a> {
|
|||
|
||||
pub fn draw_image(&self,
|
||||
bounds: &Rect<Au>,
|
||||
image: Arc<Box<Image>>,
|
||||
image: Arc<Image>,
|
||||
image_rendering: image_rendering::T) {
|
||||
let size = Size2D(image.width as i32, image.height as i32);
|
||||
let (pixel_width, pixels, source_format) = match image.pixels {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue