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

Unified Diff: src/utils/SkTextureCompressor_ASTC.cpp

Issue 456873003: Add BlitRect to SkTCompressedAlphaBlitter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Small nit Created 6 years, 4 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_Blitter.h » ('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 029f7f24267a319ddde509034d0d33d573dde2ec..c7c7f1401950c201fb93f668f154f777c2464092 100644
--- a/src/utils/SkTextureCompressor_ASTC.cpp
+++ b/src/utils/SkTextureCompressor_ASTC.cpp
@@ -2000,6 +2000,12 @@ static void decompress_astc_block(uint8_t* dst, int dstRowBytes,
}
}
+////////////////////////////////////////////////////////////////////////////////
+//
+// ASTC Comrpession Struct
+//
+////////////////////////////////////////////////////////////////////////////////
+
// This is the type passed as the CompressorType argument of the compressed
// blitter for the ASTC format. The static functions required to be in this
// struct are documented in SkTextureCompressor_Blitter.h
@@ -2013,8 +2019,19 @@ struct CompressorASTC {
compress_a8_astc_block<GetAlpha>(&dst, src, srcRowBytes);
}
- static inline void UpdateBlock(uint8_t* dst, const uint8_t* src) {
+#if PEDANTIC_BLIT_RECT
+ static inline void UpdateBlock(uint8_t* dst, const uint8_t* src, int srcRowBytes,
+ const uint8_t* mask) {
+ // TODO: krajcevski
+ // This is kind of difficult for ASTC because the weight values are calculated
+ // as an average of the actual weights. The best we can do is decompress the
+ // weights and recalculate them based on the new texel values. This should
+ // be "not too bad" since we know that anytime we hit this function, we're
+ // compressing 12x12 block dimension alpha-only, and we know the layout
+ // of the block
+ SkFAIL("Implement me!");
}
+#endif
};
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | src/utils/SkTextureCompressor_Blitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698