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>
This commit is contained in:
sagudev 2025-05-01 19:49:59 +02:00 committed by GitHub
parent 1a3f10bba4
commit 3648525fe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 28 additions and 71 deletions

View file

@ -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,
}