| Index: src/utils/SkTextureCompressor_LATC.cpp
|
| diff --git a/src/utils/SkTextureCompressor_LATC.cpp b/src/utils/SkTextureCompressor_LATC.cpp
|
| index 937aec809e4c182bacd8bde581dc5fb8ae6536ec..f0cf4a90ac3d09cf3c50caf37a82c90d4b925d27 100644
|
| --- a/src/utils/SkTextureCompressor_LATC.cpp
|
| +++ b/src/utils/SkTextureCompressor_LATC.cpp
|
| @@ -85,7 +85,7 @@ typedef uint64_t (*A84x4To64BitProc)(const uint8_t block[]);
|
| // src pixels are divisible by 4, and copy 4x4 blocks one at a time
|
| // for compression.
|
| static bool compress_4x4_a8_to_64bit(uint8_t* dst, const uint8_t* src,
|
| - int width, int height, int rowBytes,
|
| + int width, int height, size_t rowBytes,
|
| A84x4To64BitProc proc) {
|
| // Make sure that our data is well-formed enough to be considered for compression
|
| if (0 == width || 0 == height || (width % 4) != 0 || (height % 4) != 0) {
|
| @@ -350,15 +350,15 @@ static inline uint32_t convert_index(uint32_t x) {
|
| return pack_index(x);
|
| }
|
|
|
| -typedef uint64_t (*PackIndicesProc)(const uint8_t* alpha, int rowBytes);
|
| +typedef uint64_t (*PackIndicesProc)(const uint8_t* alpha, size_t rowBytes);
|
| template<PackIndicesProc packIndicesProc>
|
| -static void compress_a8_latc_block(uint8_t** dstPtr, const uint8_t* src, int rowBytes) {
|
| +static void compress_a8_latc_block(uint8_t** dstPtr, const uint8_t* src, size_t rowBytes) {
|
| *(reinterpret_cast<uint64_t*>(*dstPtr)) =
|
| SkEndian_SwapLE64(0xFF | (packIndicesProc(src, rowBytes) << 16));
|
| *dstPtr += 8;
|
| }
|
|
|
| -inline uint64_t PackRowMajor(const uint8_t *indices, int rowBytes) {
|
| +inline uint64_t PackRowMajor(const uint8_t *indices, size_t rowBytes) {
|
| uint64_t result = 0;
|
| for (int i = 0; i < 4; ++i) {
|
| const uint32_t idx = *(reinterpret_cast<const uint32_t*>(indices + i*rowBytes));
|
| @@ -367,7 +367,7 @@ inline uint64_t PackRowMajor(const uint8_t *indices, int rowBytes) {
|
| return result;
|
| }
|
|
|
| -inline uint64_t PackColumnMajor(const uint8_t *indices, int rowBytes) {
|
| +inline uint64_t PackColumnMajor(const uint8_t *indices, size_t rowBytes) {
|
| // !SPEED! Blarg, this is kind of annoying. SSE4 can make this
|
| // a LOT faster.
|
| uint8_t transposed[16];
|
| @@ -381,7 +381,7 @@ inline uint64_t PackColumnMajor(const uint8_t *indices, int rowBytes) {
|
| }
|
|
|
| static bool compress_4x4_a8_latc(uint8_t* dst, const uint8_t* src,
|
| - int width, int height, int rowBytes) {
|
| + int width, int height, size_t rowBytes) {
|
|
|
| if (width < 0 || ((width % 4) != 0) || height < 0 || ((height % 4) != 0)) {
|
| return false;
|
| @@ -472,7 +472,7 @@ struct CompressorLATC {
|
|
|
| namespace SkTextureCompressor {
|
|
|
| -bool CompressA8ToLATC(uint8_t* dst, const uint8_t* src, int width, int height, int rowBytes) {
|
| +bool CompressA8ToLATC(uint8_t* dst, const uint8_t* src, int width, int height, size_t rowBytes) {
|
| #if COMPRESS_LATC_FAST
|
| return compress_4x4_a8_latc(dst, src, width, height, rowBytes);
|
| #elif COMPRESS_LATC_SLOW
|
|
|