mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
canvas: Move peniko/kurbo conversions in separate file (#38279)
This will allow reusing those conversions in vello_cpu backend. Testing: Just refactor Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
4d899ecba5
commit
daebb5a033
7 changed files with 224 additions and 210 deletions
|
@ -92,3 +92,10 @@ pub(crate) trait GenericDrawTarget {
|
|||
) -> (ImageDescriptor, SerializableImageData);
|
||||
fn snapshot(&mut self) -> Snapshot;
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // used by gated backends
|
||||
/// A version of the `Into<T>` trait from the standard library that can be used
|
||||
/// to convert between two types that are not defined in the canvas crate.
|
||||
pub(crate) trait Convert<T> {
|
||||
fn convert(self) -> T;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue