#include "src/core/SkCompressedDataUtils.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkData.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkMathPriv.h"
#include "src/core/SkMipmap.h"
#include <algorithm>
#include <cstdint>
usingnamespaceskia_private;
struct ETC1Block { … };
constexpr uint32_t kFlipBit = …;
constexpr uint32_t kDiffBit = …;
static inline int extend_4To8bits(int b) { … }
static inline int extend_5To8bits(int b) { … }
static inline int extend_5plus3To8Bits(int base, int diff) { … }
static const int kNumETC1ModifierTables = …;
static const int kNumETC1PixelIndices = …;
static const int kETC1ModifierTables[kNumETC1ModifierTables][kNumETC1PixelIndices] = …;
static int num_4x4_blocks(int size) { … }
static int xy_to_subblock_index(int x, int y, bool flip) { … }
struct IColor { … };
static SkPMColor add_delta_and_clamp(const IColor& col, int delta) { … }
static bool decompress_etc1(SkISize dimensions, const uint8_t* srcData, SkBitmap* dst) { … }
struct BC1Block { … };
static SkPMColor from565(uint16_t rgb565) { … }
static SkPMColor lerp(float t, SkPMColor col0, SkPMColor col1) { … }
static bool decompress_bc1(SkISize dimensions, const uint8_t* srcData,
bool isOpaque, SkBitmap* dst) { … }
bool SkDecompress(sk_sp<SkData> data,
SkISize dimensions,
SkTextureCompressionType compressionType,
SkBitmap* dst) { … }
size_t SkCompressedDataSize(SkTextureCompressionType type, SkISize dimensions,
TArray<size_t>* individualMipOffsets, bool mipmapped) { … }
size_t SkCompressedBlockSize(SkTextureCompressionType type) { … }
size_t SkCompressedFormatDataSize(SkTextureCompressionType compressionType,
SkISize dimensions, bool mipmapped) { … }