servo/components/canvas
sagudev 9b5b26386c
canvas: Use wrapped kurbo::BezPath for path everywhere (#37967)
This PR removes existing path(segment) abstractions in favor of
`kurbo::BezPath`, well actually wrapped `kurbo::BezPath`, to ensure
building of valid paths. This allows us better Path2D building in script
and doing all validation and segmentation there and also allows us
remove blocking is_point_in_path on Path2D as we can now do this in
script. Current path is still done on canvas thread side as it will be
harder to move to script (will be done as a follow up), but it now uses
this new path abstraction.

Using kurbo also allows us to ditch our manual svgpath parser with the
one provided by kurbo.

Same code is stolen from: https://github.com/servo/servo/pull/36821.

Testing: Existing WPT tests
Fixes: #37904

wpt run: https://github.com/sagudev/servo/actions/runs/16172191716

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-12 10:37:47 +00:00
..
backend.rs canvas: Use wrapped kurbo::BezPath for path everywhere (#37967) 2025-07-12 10:37:47 +00:00
canvas_data.rs canvas: Use wrapped kurbo::BezPath for path everywhere (#37967) 2025-07-12 10:37:47 +00:00
canvas_paint_thread.rs canvas: Use wrapped kurbo::BezPath for path everywhere (#37967) 2025-07-12 10:37:47 +00:00
Cargo.toml canvas: Use wrapped kurbo::BezPath for path everywhere (#37967) 2025-07-12 10:37:47 +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: Use wrapped kurbo::BezPath for path everywhere (#37967) 2025-07-12 10:37:47 +00:00