image_generator_apng.cc
Source contains an unconditional loopimports third_party/zlib/zlib.h
SHA-2565631cd89466657143da897798501555fe307b02c8aee1fa8bbf14b618b169bb4
MaleculeH(Db₂)Md(In)
Evidence
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "image_generator_apng.h"
6#include <cstddef>
7#include <cstring>
8
9#include "flutter/fml/logging.h"
10#include "third_party/skia/include/codec/SkCodec.h"
11#include "third_party/skia/include/codec/SkCodecAnimation.h"
12#include "third_party/skia/include/core/SkAlphaType.h"
13#include "third_party/skia/include/core/SkColorType.h"
14#include "third_party/skia/include/core/SkImageInfo.h"
15#include "third_party/skia/include/core/SkStream.h"
16#include "third_party/zlib/zlib.h" // For crc32
17
18namespace flutter {
⋯4 lines
237:35… ough to at least contain the PNG signature
238 // and a chunk header.
239 if (data->size() < sizeof(kPngSignature) + sizeof(ChunkHeader)) {
240 return …
358:71… size) {
359 std::vector<uint8_t> result(sizeof(kPngSignature));
360 memcpy(result.data(), kPngSignature, sizeof(kPngSignature));
361
362 const ChunkHeader* chunk = reinterpret_cast<const ChunkHeader*>(
363 …
464:2… // reached, recording the chunks to copy along with their required space.
465 // TODO(bdero): Validate that IDAT/fdAT chunks are contiguous.
466 // TOD …