servo/components/canvas
sagudev 5cdb0865ba
canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793)
`surface()` returns `SourceSurface` which is/was meant as optimization
when passing from canvas to canvas (in vello that would be wgpu texture;
but raquote does not really have this) while bytes returns something
that must impl AsRef<[u8]> (this is more generic then `&[u8]` as it
allows us to have type with drop impl - wgpu's BufferView).

Testing: This is just refactoring (protected by rust), but there are WPT
tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-05-01 14:18:56 +00:00
..
backend.rs canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793) 2025-05-01 14:18:56 +00:00
canvas_data.rs canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793) 2025-05-01 14:18:56 +00:00
canvas_paint_thread.rs Use backend trait with associated types for 2d canvas backends abstraction (#36783) 2025-05-01 04:16:23 +00:00
Cargo.toml Split webgl into separate crate (#36718) 2025-04-30 05:27:44 +00:00
lib.rs Use backend trait with associated types for 2d canvas backends abstraction (#36783) 2025-05-01 04:16:23 +00:00
raqote_backend.rs canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793) 2025-05-01 14:18:56 +00:00