Closed LucaCiucci closed 1 year ago
I think the implementation is at a good point so I'm marking it as "ready for review". Some clippy are failing but I think this is related to #555.
Yes #555 resolved CI errors in master
and is now merged. You can now rebase your fork on master
to get those fixes here too.
Done, I also corrected a mistake I made on cairo. Unfortunately, I cannot test piet-cairo and piet-coregraphics on my system.
I still have to implement some checks but I'm unsure about what kind of error to return when the given buf
is smaller than bytest_per_pixel * stride * height
. Maybe InvalidInput
or BackendError
?
I think InvalidInput
is a good choice.
I think I've done. Let me know if you are satisfied with the changes, especially with the fact that make_image
is now a provided method.
Looks like that error is now being triggered.
Running `target/debug/examples/test-picture --all --scale=1 --out=cairo_samples --compare=./piet/snapshots/cairo`
error in sample 2: 'Invalid input'
error generating sample: Invalid input
I have't looked deeper to see what's going on.
67af29b should fix this, but I cannot test it at the moment. Can you run the workflows again?
The
make_image_with_stride
function will allow to create images from a buffer with a specific row stride. See #553 for more info.Progress:
make_image_with_stride
toRenderContext
NullRenderContext
piet-cairo
piet-coregraphics
piet-direct2d
piet-svg
piet-web
std::ptr::copy_nonoverlapping
~copy_from_slice
when possibleResolves #553.