Lazily initialize canvas paint thread in constellation (#37765)

This PR moves canvas paint thread initialization to constellation. This
allows us to lazily initialize it on first create canvas request (like
we do for webgpu). If we didn't started canvas paint thread we also do
not need to wait for it's teardown.

Per https://chromestatus.com/metrics/webfeature/timeline/popularity/201
~30% of websites still use 2d canvas.

Testing: Existing WPT tests

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-06-28 19:29:11 +02:00 committed by GitHub
parent ee7cb80213
commit 5311beb34a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 32 deletions

View file

@ -23,6 +23,7 @@ background_hang_monitor_api = { workspace = true }
backtrace = { workspace = true }
base = { workspace = true }
bluetooth_traits = { workspace = true, optional = true }
canvas = { path = "../canvas" }
canvas_traits = { workspace = true }
compositing_traits = { workspace = true }
constellation_traits = { workspace = true }