Don't convert svg to BGRA before passing to shader
Now that the shader is using RGBA, this incorrectly swaps the components.
This commit is contained in:
parent
370fa14efb
commit
a250aab958
1 changed files with 2 additions and 9 deletions
|
|
@ -121,15 +121,8 @@ impl<T: Storage> Cache<T> {
|
||||||
img.as_mut(),
|
img.as_mut(),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let mut rgba = img.take();
|
let allocation =
|
||||||
rgba.chunks_exact_mut(4).for_each(|rgba| rgba.swap(0, 2));
|
storage.upload(width, height, img.data(), state)?;
|
||||||
|
|
||||||
let allocation = storage.upload(
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
bytemuck::cast_slice(rgba.as_slice()),
|
|
||||||
state,
|
|
||||||
)?;
|
|
||||||
log::debug!("allocating {} {}x{}", id, width, height);
|
log::debug!("allocating {} {}x{}", id, width, height);
|
||||||
|
|
||||||
let _ = self.svg_hits.insert(id);
|
let _ = self.svg_hits.insert(id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue