mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 11:54:53 +03:00
PNGLoader: Disable debug spam.
This commit is contained in:
parent
e9c0f4567d
commit
9eab8734fe
Notes:
sideshowbarker
2024-07-19 14:41:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9eab8734fe4
@ -394,9 +394,11 @@ static bool process_IHDR(const ByteBuffer& data, PNGLoadingContext& context)
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
#ifdef PNG_DEBUG
|
||||
printf("PNG: %dx%d (%d bpp)\n", context.width, context.height, context.bit_depth);
|
||||
printf(" Color type: %b\n", context.color_type);
|
||||
printf(" Interlace type: %b\n", context.interlace_method);
|
||||
#endif
|
||||
|
||||
context.decompression_buffer_size = (context.width * context.height * context.bytes_per_pixel + context.height);
|
||||
context.decompression_buffer = (byte*)mmap(nullptr, context.decompression_buffer_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
|
||||
@ -432,7 +434,9 @@ static bool process_chunk(Streamer& streamer, PNGLoadingContext& context)
|
||||
printf("Bail at chunk_crc\n");
|
||||
return false;
|
||||
}
|
||||
#ifdef PNG_DEBUG
|
||||
printf("Chunk type: '%s', size: %u, crc: %x\n", chunk_type, chunk_size, chunk_crc);
|
||||
#endif
|
||||
|
||||
if (!strcmp((const char*)chunk_type, "IHDR"))
|
||||
return process_IHDR(chunk_data, context);
|
||||
|
Loading…
Reference in New Issue
Block a user