aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/utils/SkTextureCompressor_Blitter.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h
index e44a5deade..fe465be0a0 100644
--- a/src/utils/SkTextureCompressor_Blitter.h
+++ b/src/utils/SkTextureCompressor_Blitter.h
@@ -406,7 +406,18 @@ private:
}
// If we didn't land on a block boundary, output the block...
- if ((curX % BlockDim) > 1) {
+ if ((curX % BlockDim) > 0) {
+#ifdef SK_DEBUG
+ for (int i = 0; i < BlockDim; ++i) {
+ SkASSERT(nextX[i] == kLongestRun || nextX[i] == curX);
+ }
+#endif
+ const int col = curX % BlockDim;
+ const int colsLeft = BlockDim - col;
+
+ memset(curAlphaColumn, 0, sizeof(curAlphaColumn));
+ this->updateBlockColumns(block, col, colsLeft, curAlphaColumn);
+
CompressorType::CompressA8Vertical(outPtr, reinterpret_cast<uint8_t*>(block));
}