diff --git a/components/layout_2020/dom_traversal.rs b/components/layout_2020/dom_traversal.rs index 5af0305c7d1..99bf0804ce6 100644 --- a/components/layout_2020/dom_traversal.rs +++ b/components/layout_2020/dom_traversal.rs @@ -451,6 +451,7 @@ where HTMLCanvasDataSource::Image(ipc_sender) => { CanvasSource::Image(ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer)))) }, + HTMLCanvasDataSource::WebGPU(image_key) => CanvasSource::WebGPU(image_key), }; Some(( CanvasInfo { diff --git a/components/layout_2020/replaced.rs b/components/layout_2020/replaced.rs index d10e03198ac..3cb7dd725a4 100644 --- a/components/layout_2020/replaced.rs +++ b/components/layout_2020/replaced.rs @@ -52,6 +52,7 @@ pub(crate) struct IntrinsicSizes { pub(crate) enum CanvasSource { WebGL(ImageKey), Image(Option>>>), + WebGPU(ImageKey), } impl fmt::Debug for CanvasSource { @@ -62,6 +63,7 @@ impl fmt::Debug for CanvasSource { match *self { CanvasSource::WebGL(_) => "WebGL", CanvasSource::Image(_) => "Image", + CanvasSource::WebGPU(_) => "WebGPU", } ) } @@ -210,6 +212,7 @@ impl ReplacedContent { let image_key = match canvas_info.source { CanvasSource::WebGL(image_key) => image_key, + CanvasSource::WebGPU(image_key) => image_key, CanvasSource::Image(ref ipc_renderer) => match *ipc_renderer { Some(ref ipc_renderer) => { let ipc_renderer = ipc_renderer.lock().unwrap();