summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx
diff options
context:
space:
mode:
authorPeter Nelson <peter@peterdn.com>2020-11-08 17:43:01 +0000
committerAndreas Kling <kling@serenityos.org>2020-11-08 21:40:47 +0100
commite23daa90a3924c9233e98241e8d97466b354ed6a (patch)
treeeded9e193afcaf2a690ee78ab8fbdbd2568eb1eb /Libraries/LibGfx
parentcd38fab63f6b0a7673f4f6145f63b8a13bf515ec (diff)
downloadserenity-e23daa90a3924c9233e98241e8d97466b354ed6a.zip
LibGfx: remove debug printfs from GIFLoader
Diffstat (limited to 'Libraries/LibGfx')
-rw-r--r--Libraries/LibGfx/GIFLoader.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp
index d136e81f73..421b7dbe75 100644
--- a/Libraries/LibGfx/GIFLoader.cpp
+++ b/Libraries/LibGfx/GIFLoader.cpp
@@ -300,7 +300,6 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
for (size_t i = start_frame; i <= frame_index; ++i) {
auto& image = context.images.at(i);
- printf("Image %zu: %d,%d %dx%d %zu bytes LZW-encoded\n", i, image.x, image.y, image.width, image.height, image.lzw_encoded_bytes.size());
const auto previous_image_disposal_method = i > 0 ? context.images.at(i - 1).disposal_method : ImageDescriptor::DisposalMethod::None;
@@ -400,8 +399,6 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
return false;
}
- printf("Format is %s\n", format.value() == GIFFormat::GIF89a ? "GIF89a" : "GIF87a");
-
LittleEndian<u16> value;
stream >> value;
@@ -419,32 +416,20 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (stream.handle_any_error())
return false;
- bool global_color_map_follows_descriptor = gcm_info & 0x80;
- u8 bits_per_pixel = (gcm_info & 7) + 1;
- u8 bits_of_color_resolution = (gcm_info >> 4) & 7;
-
- printf("LogicalScreen: %dx%d\n", context.logical_screen.width, context.logical_screen.height);
- printf("global_color_map_follows_descriptor: %u\n", global_color_map_follows_descriptor);
- printf("bits_per_pixel: %u\n", bits_per_pixel);
- printf("bits_of_color_resolution: %u\n", bits_of_color_resolution);
-
stream >> context.background_color_index;
if (stream.handle_any_error())
return false;
- printf("background_color: %u\n", context.background_color_index);
-
u8 pixel_aspect_ratio = 0;
stream >> pixel_aspect_ratio;
if (stream.handle_any_error())
return false;
+ u8 bits_per_pixel = (gcm_info & 7) + 1;
int color_map_entry_count = 1;
for (int i = 0; i < bits_per_pixel; ++i)
color_map_entry_count *= 2;
- printf("color_map_entry_count: %d\n", color_map_entry_count);
-
for (int i = 0; i < color_map_entry_count; ++i) {
u8 r = 0;
u8 g = 0;
@@ -456,16 +441,10 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (stream.handle_any_error())
return false;
- for (int i = 0; i < color_map_entry_count; ++i) {
- auto& color = context.logical_screen.color_map[i];
- printf("[%02x]: %s\n", i, color.to_string().characters());
- }
-
NonnullOwnPtr<ImageDescriptor> current_image = make<ImageDescriptor>();
for (;;) {
u8 sentinel = 0;
stream >> sentinel;
- printf("Sentinel: %02x at offset %x\n", sentinel, (unsigned)stream.offset());
if (sentinel == 0x21) {
u8 extension_type = 0;
@@ -473,8 +452,6 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (stream.handle_any_error())
return false;
- printf("Extension block of type %02x\n", extension_type);
-
u8 sub_block_length = 0;
Vector<u8> sub_block {};
@@ -575,12 +552,8 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
}
}
- printf("Image descriptor: %d,%d %dx%d, %02x\n", image.x, image.y, image.width, image.height, packed_fields);
-
stream >> image.lzw_min_code_size;
- printf("min code size: %u\n", image.lzw_min_code_size);
-
u8 lzw_encoded_bytes_expected = 0;
for (;;) {
@@ -608,7 +581,6 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
}
if (sentinel == 0x3b) {
- printf("Trailer! Awesome :)\n");
break;
}