servo/components/canvas
sagudev 429b91da49
canvas: Store current path only in user space (#38098)
Before we stored path in user or device space and do conversions as
needed, but that complicated things.

So we got two options:
1. store path in device space: here we would need to add
`Option<Transform>` to each path command, and before each usage we need
to invert current transform (as current transform is already applied by
stroke/fill and we cannot just pass I, because we need scaling to make
lines thicker)
2. store path in user space and do transform whenever we change the
transform. There is no need to do inverse on uses.

I chose option 2. because it's less complicated and will probably
benefit performance (set transform typically called more rarely than
path building/fill/stroke).

In follow up PR I will move all of this to script, that's why
PathBuilderRef was not removed yet.

Testing: Existing WPT tests
work towards #38022
try run: https://github.com/sagudev/servo/actions/runs/16304221495

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-16 07:30:20 +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: Store current path only in user space (#38098) 2025-07-16 07:30:20 +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