Roll back 'dst_palette into the pixel_swizzler'

See the previous commit for the rationale.
This commit is contained in:
Nigel Tao committed 2020-05-26 14:13:28 +10:00
1 parent 2d8ec9ace9
commit 1239280ad8
9 files changed
+310 -236

No files matched your search

+2
View File
@@ -341,6 +341,7 @@ pri func decoder.swizzle!(dst: ptr base.pixel_buffer, src: slice base.u8) base.s
if i < dst.length() {
this.swizzler.swizzle_interleaved!(
dst: dst[i ..],
dst_palette: this.util.empty_slice_u8(),
src: this.stash[.. this.num_stashed])
this.dst_x ~sat+= 1
}
@@ -376,6 +377,7 @@ pri func decoder.swizzle!(dst: ptr base.pixel_buffer, src: slice base.u8) base.s
if i < dst.length() {
n = this.swizzler.swizzle_interleaved!(
dst: dst[i ..],
dst_palette: this.util.empty_slice_u8(),
src: args.src)
this.dst_x ~sat+= (n & 0xFFFF_FFFF) as base.u32
n = (n & 0xFFFF_FFFF) * (src_bytes_per_pixel as base.u64)