38 return (c << 3) | (c >> 2);
53 { 33, 106, -33, -106 },
54 { 47, 183, -47, -183 }
60 int r8,
int g8,
int b8,
91 high |= (r5 << 27) | (g5 << 19) | (b5 << 11) |
kDiffBit;
93 int bestTableIndex = 0, bestPixelIndex = 0;
98 tableIndex, pixelIndex);
100 if (bestSoFar > score) {
102 bestTableIndex = tableIndex;
103 bestPixelIndex = pixelIndex;
108 high |= (bestTableIndex << 5) | (bestTableIndex << 2);
110 if (bestPixelIndex & 0x1) {
113 if (bestPixelIndex & 0x2) {
122 return ((
size + 3) & ~3) >> 2;
143 return (r5 << 11) | (g6 << 5) | b5;
166 return baseDimensions.
width() * baseDimensions.
height();
173 return numBlocksWidth * numBlocksHeight;
189 return numBlocksWidth *
sizeof(
ETC1Block);
198 return baseDimensions;
213 return baseDimensions;
221 return { numBlocksWidth, numBlocksHeight };
236 for (
int i = 0;
i < numBlocks; ++
i) {
251 for (
int i = 0;
i < numBlocks; ++
i) {
264 int numMipLevels = 1;
271 for (
int i = 0;
i < numMipLevels; ++
i) {
#define SkColorGetR(color)
#define SkColorGetG(color)
constexpr SkColor SK_ColorTRANSPARENT
#define SkColorGetB(color)
size_t SkCompressedDataSize(SkTextureCompressionType type, SkISize dimensions, TArray< size_t > *individualMipOffsets, bool mipmapped)
static uint32_t SkBSwap32(uint32_t v)
static U8CPU SkMulDiv255Round(U16CPU a, U16CPU b)
static int ComputeLevelCount(int baseWidth, int baseHeight)
static float max(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void FillInCompressedData(SkTextureCompressionType type, SkISize dimensions, skgpu::Mipmapped mipmapped, char *dstPixels, const SkColor4f &colorf)
static const int kNumETC1PixelIndices
SkISize CompressedDimensionsInBlocks(SkTextureCompressionType type, SkISize baseDimensions)
static void create_etc1_block(SkColor col, ETC1Block *block)
static int test_table_entry(int rOrig, int gOrig, int bOrig, int r8, int g8, int b8, int table, int offset)
static void create_BC1_block(SkColor col0, SkColor col1, BC1Block *block)
constexpr uint32_t kDiffBit
static uint16_t to565(SkColor col)
size_t CompressedRowBytes(SkTextureCompressionType type, int width)
static const int kNumETC1ModifierTables
static int extend_5To8bits(int b)
size_t NumCompressedBlocks(SkTextureCompressionType type, SkISize baseDimensions)
static int num_4x4_blocks(int size)
static void fillin_ETC1_with_color(SkISize dimensions, const SkColor4f &colorf, char *dest)
static void fillin_BC1_with_color(SkISize dimensions, const SkColor4f &colorf, char *dest)
static int num_ETC1_blocks(int w, int h)
SkISize CompressedDimensions(SkTextureCompressionType type, SkISize baseDimensions)
static const int kETC1ModifierTables[kNumETC1ModifierTables][kNumETC1PixelIndices]
constexpr int32_t width() const
constexpr int32_t height() const
#define TRACE_EVENT0(category_group, name)