Merge pull request #1507 from ids1024/rgba-svg

Don't convert svg to BGRA before passing to shader
This commit is contained in:
Héctor Ramón 2022-11-05 08:12:27 +01:00 committed by GitHub
commit da2325d18d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,15 +121,8 @@ impl<T: Storage> Cache<T> {
img.as_mut(),
)?;
let mut rgba = img.take();
rgba.chunks_exact_mut(4).for_each(|rgba| rgba.swap(0, 2));
let allocation = storage.upload(
width,
height,
bytemuck::cast_slice(rgba.as_slice()),
state,
)?;
let allocation =
storage.upload(width, height, img.data(), state)?;
log::debug!("allocating {} {}x{}", id, width, height);
let _ = self.svg_hits.insert(id);