diff options
author | sagudev <16504129+sagudev@users.noreply.github.com> | 2025-05-01 19:49:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-01 17:49:59 +0000 |
commit | 3648525fe8f461190869a81c75643890b21e6565 (patch) | |
tree | 0ee9a68fbdd01db875c52370aacd7499709e5950 /components/shared/script_layout/lib.rs | |
parent | 1a3f10bba43f0bc051de1baac1ee17ab26db6143 (diff) | |
download | servo-3648525fe8f461190869a81c75643890b21e6565.tar.gz servo-3648525fe8f461190869a81c75643890b21e6565.zip |
Remove `HTMLCanvasDataSource` and `CanvasSource` (#36794)
All canvases return `Option<ImageKey>`.
Testing: Just refactor without behavior changes
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/shared/script_layout/lib.rs')
-rw-r--r-- | components/shared/script_layout/lib.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index a40b8c403c1..66baccd5147 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -117,16 +117,8 @@ pub enum LayoutElementType { SVGSVGElement, } -pub enum HTMLCanvasDataSource { - WebGL(ImageKey), - Image(ImageKey), - WebGPU(ImageKey), - /// transparent black - Empty, -} - pub struct HTMLCanvasData { - pub source: HTMLCanvasDataSource, + pub source: Option<ImageKey>, pub width: u32, pub height: u32, } |