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

Unified Diff: src/utils/SkTextureCompressor_Blitter.h

Issue 449223002: Fix bug in blitAntiH (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTextureCompressor_Blitter.h
diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h
index e44a5deade5a8eb63e0dffd73b9b822e95781b42..fe465be0a074ab230ed6b6ea90ae667768b1bcde 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));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698