mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
1a3f10bba4
commit
3648525fe8
10 changed files with 28 additions and 71 deletions
|
@ -21,7 +21,7 @@ use image::{ColorType, ImageEncoder};
|
|||
use ipc_channel::ipc::{self as ipcchan};
|
||||
use js::error::throw_type_error;
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource};
|
||||
use script_layout_interface::HTMLCanvasData;
|
||||
use servo_media::streams::MediaStreamType;
|
||||
use servo_media::streams::registry::MediaStreamId;
|
||||
use snapshot::Snapshot;
|
||||
|
@ -201,7 +201,7 @@ impl LayoutHTMLCanvasElementHelpers for LayoutDom<'_, HTMLCanvasElement> {
|
|||
Some(RenderingContext::WebGL2(context)) => context.to_layout().canvas_data_source(),
|
||||
#[cfg(feature = "webgpu")]
|
||||
Some(RenderingContext::WebGPU(context)) => context.to_layout().canvas_data_source(),
|
||||
Some(RenderingContext::Placeholder(_)) | None => HTMLCanvasDataSource::Empty,
|
||||
Some(RenderingContext::Placeholder(_)) | None => None,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue