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

Commit a7ec1e5

Browse files
Remove libpng dependency in the APNG decoder (#39622)
1 parent ab2dec5 commit a7ec1e5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/ui/painting/image_generator_apng.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <cstring>
88

99
#include "flutter/fml/logging.h"
10-
#include "third_party/libpng/png.h"
1110
#include "third_party/skia/include/codec/SkCodecAnimation.h"
1211
#include "third_party/skia/include/core/SkAlphaType.h"
1312
#include "third_party/skia/include/core/SkColorType.h"
@@ -202,8 +201,7 @@ std::unique_ptr<ImageGenerator> APNGImageGenerator::MakeFromData(
202201
}
203202
// Validate the full PNG signature.
204203
const uint8_t* data_p = static_cast<const uint8_t*>(data.get()->data());
205-
if (png_sig_cmp(static_cast<png_const_bytep>(data_p), 0,
206-
sizeof(kPngSignature))) {
204+
if (memcmp(data_p, kPngSignature, sizeof(kPngSignature))) {
207205
return nullptr;
208206
}
209207

0 commit comments

Comments
 (0)