Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Remove libpng dependency in the APNG decoder (#39622)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Feb 14, 2023
1 parent ab2dec5 commit a7ec1e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/ui/painting/image_generator_apng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <cstring>

#include "flutter/fml/logging.h"
#include "third_party/libpng/png.h"
#include "third_party/skia/include/codec/SkCodecAnimation.h"
#include "third_party/skia/include/core/SkAlphaType.h"
#include "third_party/skia/include/core/SkColorType.h"
Expand Down Expand Up @@ -202,8 +201,7 @@ std::unique_ptr<ImageGenerator> APNGImageGenerator::MakeFromData(
}
// Validate the full PNG signature.
const uint8_t* data_p = static_cast<const uint8_t*>(data.get()->data());
if (png_sig_cmp(static_cast<png_const_bytep>(data_p), 0,
sizeof(kPngSignature))) {
if (memcmp(data_p, kPngSignature, sizeof(kPngSignature))) {
return nullptr;
}

Expand Down

0 comments on commit a7ec1e5

Please sign in to comment.