mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
canvas: Update the image as part of update the rendering (#35996)
* Create `update_rendering` in `CanvasState` instead of manually updating in layout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Mark as dirty and do flushes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup rebase Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update components/script/dom/htmlcanvaselement.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ed995e61a6
commit
62737b3830
11 changed files with 72 additions and 51 deletions
|
@ -79,12 +79,6 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
canvas_paint_thread.canvas(canvas_id).send_pixels(chan);
|
||||
},
|
||||
},
|
||||
Ok(CanvasMsg::FromLayout(message, canvas_id)) => match message {
|
||||
FromLayoutMsg::UpdateImage(sender) => {
|
||||
canvas_paint_thread.canvas(canvas_id).update_image_rendering();
|
||||
sender.send(()).unwrap();
|
||||
},
|
||||
},
|
||||
Err(e) => {
|
||||
warn!("Error on CanvasPaintThread receive ({})", e);
|
||||
},
|
||||
|
@ -256,6 +250,10 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
Canvas2dMsg::SetTextBaseline(text_baseline) => {
|
||||
self.canvas(canvas_id).set_text_baseline(text_baseline)
|
||||
},
|
||||
Canvas2dMsg::UpdateImage(sender) => {
|
||||
self.canvas(canvas_id).update_image_rendering();
|
||||
sender.send(()).unwrap();
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue