Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: src/utils/SkTextureCompressor_ASTC.cpp

Issue 429683003: Bring LATC in line with other formats (i.e. write a blitter and (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comments and test dimensions Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/utils/SkTextureCompressor_LATC.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTextureCompressor_ASTC.cpp
diff --git a/src/utils/SkTextureCompressor_ASTC.cpp b/src/utils/SkTextureCompressor_ASTC.cpp
index 402588e746aefd6ceac4e08e1cffe5fb093adc09..8efffdfc9e8f04e035009bfc17a207ab8297758c 100644
--- a/src/utils/SkTextureCompressor_ASTC.cpp
+++ b/src/utils/SkTextureCompressor_ASTC.cpp
@@ -256,7 +256,7 @@ static void compress_a8_astc_block(uint8_t** dst, const uint8_t* src, int rowByt
send_packing(dst, SkEndian_SwapLE64(top), SkEndian_SwapLE64(bottom));
}
-inline void compress_a8_astc_block_vertical(uint8_t* dst, const uint8_t* src) {
+inline void CompressA8ASTCBlockVertical(uint8_t* dst, const uint8_t* src) {
compress_a8_astc_block<GetAlphaTranspose>(&dst, src, 12);
}
@@ -270,8 +270,8 @@ bool CompressA8To12x12ASTC(uint8_t* dst, const uint8_t* src, int width, int heig
}
uint8_t** dstPtr = &dst;
- for (int y = 0; y < height; y+=12) {
- for (int x = 0; x < width; x+=12) {
+ for (int y = 0; y < height; y += 12) {
+ for (int x = 0; x < width; x += 12) {
compress_a8_astc_block<GetAlpha>(dstPtr, src + y*rowBytes + x, rowBytes);
}
}
@@ -281,7 +281,7 @@ bool CompressA8To12x12ASTC(uint8_t* dst, const uint8_t* src, int width, int heig
SkBlitter* CreateASTCBlitter(int width, int height, void* outputBuffer) {
return new
- SkTCompressedAlphaBlitter<12, 16, compress_a8_astc_block_vertical>
+ SkTCompressedAlphaBlitter<12, 16, CompressA8ASTCBlockVertical>
(width, height, outputBuffer);
}
« no previous file with comments | « no previous file | src/utils/SkTextureCompressor_LATC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698