Merge pull request #1030 from Kelimion/zlib_optimize

Comment out tracy imports.
This commit is contained in:
Jeroen van Rijn
2021-06-21 21:43:57 +02:00
committed by GitHub
3 changed files with 6 additions and 4 deletions
+1 -3
View File
@@ -11,9 +11,7 @@ package compress
import "core:io" import "core:io"
import "core:image" import "core:image"
when #config(TRACY_ENABLE, false) { // when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" }
import tracy "shared:odin-tracy"
}
Error :: union { Error :: union {
General_Error, General_Error,
+1 -1
View File
@@ -16,7 +16,7 @@ import "core:io"
import "core:bytes" import "core:bytes"
import "core:hash" import "core:hash"
when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" } // when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" }
/* /*
zlib.inflate decompresses a ZLIB stream passed in as a []u8 or io.Stream. zlib.inflate decompresses a ZLIB stream passed in as a []u8 or io.Stream.
+4
View File
@@ -34,6 +34,10 @@ destroy :: proc(img: ^Image) {
} }
bytes.buffer_destroy(&img.pixels); bytes.buffer_destroy(&img.pixels);
if img.metadata_ptr != nil && img.metadata_type == Info {
// Clean up Info.
free(img.metadata_ptr);
}
/* /*
We don't need to do anything for the individual chunks. We don't need to do anything for the individual chunks.