#include "src/codec/SkWebpCodec.h"
#include "include/codec/SkCodec.h"
#include "include/codec/SkCodecAnimation.h"
#include "include/codec/SkWebpDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRect.h"
#include "include/core/SkSize.h"
#include "include/core/SkStream.h"
#include "include/private/base/SkAlign.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTFitsIn.h"
#include "include/private/base/SkTemplates.h"
#include "include/private/base/SkTo.h"
#include "modules/skcms/skcms.h"
#include "src/codec/SkParseEncodedOrigin.h"
#include "src/codec/SkSampler.h"
#include "src/core/SkRasterPipeline.h"
#include "src/core/SkRasterPipelineOpContexts.h"
#include "src/core/SkRasterPipelineOpList.h"
#include "src/core/SkStreamPriv.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <utility>
#include "webp/decode.h"
#include "webp/demux.h"
#include "webp/mux_types.h"
bool SkWebpCodec::IsWebp(const void* buf, size_t bytesRead) { … }
std::unique_ptr<SkCodec> SkWebpCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
Result* result) { … }
static WEBP_CSP_MODE webp_decode_mode(SkColorType dstCT, bool premultiply) { … }
SkWebpCodec::Frame* SkWebpCodec::FrameHolder::appendNewFrame(bool hasAlpha) { … }
bool SkWebpCodec::onGetValidSubset(SkIRect* desiredSubset) const { … }
int SkWebpCodec::onGetRepetitionCount() { … }
int SkWebpCodec::onGetFrameCount() { … }
const SkFrame* SkWebpCodec::FrameHolder::onGetFrame(int i) const { … }
const SkWebpCodec::Frame* SkWebpCodec::FrameHolder::frame(int i) const { … }
bool SkWebpCodec::onGetFrameInfo(int i, FrameInfo* frameInfo) const { … }
static bool is_8888(SkColorType colorType) { … }
static void blend_line(SkColorType dstCT, void* dst,
SkColorType srcCT, const void* src,
SkAlphaType dstAt,
bool srcHasAlpha,
int width) { … }
SkCodec::Result SkWebpCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t rowBytes,
const Options& options, int* rowsDecodedPtr) { … }
SkWebpCodec::SkWebpCodec(SkEncodedInfo&& info, std::unique_ptr<SkStream> stream,
WebPDemuxer* demux, sk_sp<SkData> data, SkEncodedOrigin origin)
: … { … }
namespace SkWebpDecoder {
bool IsWebp(const void* data, size_t len) { … }
std::unique_ptr<SkCodec> Decode(std::unique_ptr<SkStream> stream,
SkCodec::Result* outResult,
SkCodecs::DecodeContext) { … }
std::unique_ptr<SkCodec> Decode(sk_sp<SkData> data,
SkCodec::Result* outResult,
SkCodecs::DecodeContext) { … }
}