servo/components/canvas
sagudev 874645ae86
canvas: Do not use vello layers for opacity or default composition (#38440)
In this PR we moved global alpha handling using temporary layers to
mutation of paint in vello_cpu (we were already doing this in vello
classic). This + not using temporary layer for SrcOver (default and most
common composition operation) allows us to remove most temporary layers
from `with_composition`.

This slightly improves performance of vello backend, but drastically
improves performance of vello_cpu. We are now able to render bunnymark
(100 bunnies) with 60 FPS.

In the future we could cache current layer and change it when
compositing operation changes, although that would complicate clips, so
improvement is questionable.

Testing: Existing WPT tests for functionality, but we do not have any
performance tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-08-03 16:00:46 +00:00
..
backend.rs canvas: Respect FillRule (#38294) 2025-07-26 17:20:04 +00:00
canvas_data.rs canvas: Use create_similar_draw_target for recreate (#38336) 2025-07-29 19:45:49 +00:00
canvas_paint_thread.rs canvas: Gate raqote backend behind feature (enabled for now) (#38312) 2025-07-28 11:54:40 +00:00
Cargo.toml canvas: Gate raqote backend behind feature (enabled for now) (#38312) 2025-07-28 11:54:40 +00:00
lib.rs canvas: Gate raqote backend behind feature (enabled for now) (#38312) 2025-07-28 11:54:40 +00:00
peniko_conversions.rs canvas: Respect FillRule (#38294) 2025-07-26 17:20:04 +00:00
raqote_backend.rs canvas: Respect FillRule (#38294) 2025-07-26 17:20:04 +00:00
vello_backend.rs canvas: Do not use vello layers for opacity or default composition (#38440) 2025-08-03 16:00:46 +00:00
vello_cpu_backend.rs canvas: Do not use vello layers for opacity or default composition (#38440) 2025-08-03 16:00:46 +00:00