#include "src/codec/SkBmpCodec.h"
#include "include/codec/SkBmpDecoder.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/core/SkStream.h"
#include "include/private/SkEncodedInfo.h"
#include "include/private/base/SkAlign.h"
#include "src/codec/SkBmpMaskCodec.h"
#include "src/codec/SkBmpRLECodec.h"
#include "src/codec/SkBmpStandardCodec.h"
#include "src/codec/SkCodecPriv.h"
#include "src/core/SkMasks.h"
#include <cstring>
#include <memory>
#include <utility>
enum BmpHeaderType { … };
enum BmpCompressionMethod { … };
enum BmpInputFormat { … };
bool SkBmpCodec::IsBmp(const void* buffer, size_t bytesRead) { … }
std::unique_ptr<SkCodec> SkBmpCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
Result* result) { … }
std::unique_ptr<SkCodec> SkBmpCodec::MakeFromIco(std::unique_ptr<SkStream> stream, Result* result) { … }
static constexpr uint32_t kBmpHeaderBytes = …;
static constexpr uint32_t kBmpHeaderBytesPlusFour = …;
static constexpr uint32_t kBmpOS2V1Bytes = …;
static constexpr uint32_t kBmpOS2V2Bytes = …;
static constexpr uint32_t kBmpInfoBaseBytes = …;
static constexpr uint32_t kBmpInfoV1Bytes = …;
static constexpr uint32_t kBmpInfoV2Bytes = …;
static constexpr uint32_t kBmpInfoV3Bytes = …;
static constexpr uint32_t kBmpInfoV4Bytes = …;
static constexpr uint32_t kBmpInfoV5Bytes = …;
static constexpr uint32_t kBmpMaskBytes = …;
static BmpHeaderType get_header_type(size_t infoBytes) { … }
SkCodec::Result SkBmpCodec::ReadHeader(SkStream* stream, bool inIco,
std::unique_ptr<SkCodec>* codecOut) { … }
std::unique_ptr<SkCodec> SkBmpCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
Result* result, bool inIco) { … }
SkBmpCodec::SkBmpCodec(SkEncodedInfo&& info, std::unique_ptr<SkStream> stream,
uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
: … { … }
bool SkBmpCodec::onRewind() { … }
int32_t SkBmpCodec::getDstRow(int32_t y, int32_t height) const { … }
SkCodec::Result SkBmpCodec::prepareToDecode(const SkImageInfo& dstInfo,
const SkCodec::Options& options) { … }
SkCodec::Result SkBmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
const SkCodec::Options& options) { … }
int SkBmpCodec::onGetScanlines(void* dst, int count, size_t rowBytes) { … }
bool SkBmpCodec::skipRows(int count) { … }
bool SkBmpCodec::onSkipScanlines(int count) { … }
namespace SkBmpDecoder {
bool IsBmp(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) { … }
}