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

Unified Diff: src/core/SkScan_Antihair.cpp

Issue 1424253002: SkScan_Antihair: assert in debug and potentialy lost last pixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: test Created 5 years, 2 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 | tests/RectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Antihair.cpp
diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp
index beddf6320297a5a5870997955a664a29e9653f22..b14e12bab8c8d3157ae37ec73d3b67ca2e3c2d43 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -847,7 +847,11 @@ static void inner_scanline(FDot8 L, int top, FDot8 R, U8CPU alpha,
SkASSERT(L < R);
if ((L >> 8) == ((R - 1) >> 8)) { // 1x1 pixel
- blitter->blitV(L >> 8, top, 1, InvAlphaMul(alpha, R - L));
+ FDot8 widClamp = R - L;
+ // border case clamp 256 to 255 instead of going through call_hline_blitter
+ // see skbug/4406
+ widClamp = widClamp - (widClamp >> 8);
+ blitter->blitV(L >> 8, top, 1, InvAlphaMul(alpha, widClamp));
return;
}
« no previous file with comments | « no previous file | tests/RectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698