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:
sagudev 2025-07-26 15:14:25 +02:00 committed by GitHub
parent 4d899ecba5
commit daebb5a033
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 224 additions and 210 deletions

View file

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