mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
|
@ -6,8 +6,9 @@
|
|||
|
||||
use euclid::default::Size2D;
|
||||
use script_bindings::root::Dom;
|
||||
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource};
|
||||
use script_layout_interface::HTMLCanvasData;
|
||||
use snapshot::Snapshot;
|
||||
use webrender_api::ImageKey;
|
||||
|
||||
use crate::dom::bindings::codegen::UnionTypes::HTMLCanvasElementOrOffscreenCanvas;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
@ -19,7 +20,8 @@ use crate::dom::types::{
|
|||
};
|
||||
|
||||
pub(crate) trait LayoutCanvasRenderingContextHelpers {
|
||||
fn canvas_data_source(self) -> HTMLCanvasDataSource;
|
||||
/// `None` is rendered as transparent black (cleared canvas)
|
||||
fn canvas_data_source(self) -> Option<ImageKey>;
|
||||
}
|
||||
|
||||
pub(crate) trait LayoutHTMLCanvasElementHelpers {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue