From 9b7c63c719f45990c47d358c80f26d5b02da63b8 Mon Sep 17 00:00:00 2001 From: nworbnhoj Date: Fri, 29 Jul 2022 06:13:20 +1000 Subject: [PATCH] Box miniz_oxide InflateState --- services/gam/src/bitmap/decode_png.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/gam/src/bitmap/decode_png.rs b/services/gam/src/bitmap/decode_png.rs index 114ab1284..3c75a74b8 100644 --- a/services/gam/src/bitmap/decode_png.rs +++ b/services/gam/src/bitmap/decode_png.rs @@ -73,7 +73,7 @@ pub struct DecodePng { idat_remaining: u32, idat_buffer: Vec, // state of the miniz oxide inflation - inflate_state: InflateState, + inflate_state: Box, // fields to buffer inflated bytes waiting to be unfiltered inflated: [u8; INFLATED_BUFFER_LENGTH], inflated_length: usize, @@ -110,8 +110,7 @@ impl DecodePng { prior_px: vec![0u8, 0], idat_remaining: 0, idat_buffer: Vec::with_capacity(IDAT_BUFFER_LENGTH), - inflate_state: InflateState::new(DataFormat::Zlib), - //inflate_state: InflateState::new_boxed(DataFormat::Zlib), + inflate_state: InflateState::new_boxed(DataFormat::Zlib), inflated: [0u8; INFLATED_BUFFER_LENGTH], inflated_length: 0, inflated_index: INFLATED_BUFFER_LENGTH,