canvas: Use bytemuck to remove unsafe from raqote backend (#38283)

This PR changes surface type from `Vec<u8>` to `Vec<u32>` as this is
native type of raqote's backend. We used unsafe for `Vec<u8>` <->
`Vec<u32>` casting that is replaced with bytemuck. Bytemuck is already
in cargo lock.

Testing: Existing WPT tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-07-26 15:16:16 +02:00 committed by GitHub
parent daebb5a033
commit f8d6c5646c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 57 deletions

View file

@ -16,6 +16,7 @@ vello = ["dep:vello", "dep:pollster", "dep:futures-intrusive", "dep:peniko"]
[dependencies]
app_units = { workspace = true }
bytemuck = { workspace = true, features = ["extern_crate_alloc"] }
canvas_traits = { workspace = true }
compositing_traits = { workspace = true }
crossbeam-channel = { workspace = true }