diff options
Diffstat (limited to 'src/utils/SkTextureCompressor_R11EAC.cpp')
-rw-r--r-- | src/utils/SkTextureCompressor_R11EAC.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/SkTextureCompressor_R11EAC.cpp b/src/utils/SkTextureCompressor_R11EAC.cpp index 291820b4d7..5c298dda9a 100644 --- a/src/utils/SkTextureCompressor_R11EAC.cpp +++ b/src/utils/SkTextureCompressor_R11EAC.cpp @@ -235,7 +235,7 @@ static uint64_t compress_r11eac_block(const uint8_t block[16]) { // // this gives the following formula: // clamp[0, 2047](0*8+4+(-3)*2*8) = 0 - // + // // Furthermore, it is impervious to endianness: // 0x0020000000002000ULL // Will produce one pixel with index 2, which gives: @@ -244,7 +244,7 @@ static uint64_t compress_r11eac_block(const uint8_t block[16]) { // Fully opaque? We know this encoding too... case 255: - + // -1 produces the following: // basw_cw: 255 // mod: 15, palette: {-3, -5, -7, -9, 2, 4, 6, 8} @@ -410,7 +410,7 @@ static inline uint64_t interleave6(uint64_t topRows, uint64_t bottomRows) { x = swap_shift<36>(x, 0xFC0ULL); // x: 00 00 00 00 00 00 00 00 a e i m d h l p b f j n c g k o - + x = (x & (0xFFFULL << 36)) | ((x & 0xFFFFFFULL) << 12) | ((x >> 24) & 0xFFFULL); #endif @@ -498,13 +498,13 @@ static bool compress_a8_to_r11eac_fast(uint8_t* dst, const uint8_t* src, // the least significant 12 bits of the resulting integer. static inline uint32_t pack_indices_vertical(uint32_t x) { #if defined (SK_CPU_BENDIAN) - return + return (x & 7) | ((x >> 5) & (7 << 3)) | ((x >> 10) & (7 << 6)) | ((x >> 15) & (7 << 9)); #else - return + return ((x >> 24) & 7) | ((x >> 13) & (7 << 3)) | ((x >> 2) & (7 << 6)) | @@ -664,7 +664,7 @@ void DecompressR11EAC(uint8_t* dst, int dstRowBytes, const uint8_t* src, int wid src += 8; } dst += 4 * dstRowBytes; - } + } } } // namespace SkTextureCompressor |