mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +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
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Arc;
|
||||
|
||||
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
|
@ -155,9 +155,7 @@ where
|
|||
let canvas_data = node.canvas_data()?;
|
||||
let source = match canvas_data.source {
|
||||
HTMLCanvasDataSource::WebGL(texture_id) => CanvasSource::WebGL(texture_id),
|
||||
HTMLCanvasDataSource::Image((image_key, canvas_id, ipc_sender)) => {
|
||||
CanvasSource::Image((image_key, canvas_id, Arc::new(Mutex::new(ipc_sender))))
|
||||
},
|
||||
HTMLCanvasDataSource::Image(image_key) => CanvasSource::Image(image_key),
|
||||
HTMLCanvasDataSource::WebGPU(image_key) => CanvasSource::WebGPU(image_key),
|
||||
HTMLCanvasDataSource::Empty => CanvasSource::Empty,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue