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

Unified Diff: src/core/SkAntiRun.h

Issue 2221103002: Analytic AntiAlias for Convex Shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix alpha computation Created 4 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
Index: src/core/SkAntiRun.h
diff --git a/src/core/SkAntiRun.h b/src/core/SkAntiRun.h
index 8214e28d5b7ee8d8575c082d31b77e9f49388d5a..4537b05ac9e4e2615d75dfc2316816bcb5605d63 100644
--- a/src/core/SkAntiRun.h
+++ b/src/core/SkAntiRun.h
@@ -79,7 +79,7 @@ public:
runs += x;
x = 0;
do {
- alpha[0] = SkToU8(alpha[0] + maxValue);
+ alpha[0] = SkToU8(SkTMin<int>(0xFF, alpha[0] + maxValue));
reed1 2016/08/18 20:31:00 is this needed today, or just with your CL? If tod
liyuqian 2016/08/22 15:30:48 I don't think that the current supersampling algor
int n = runs[0];
SkASSERT(n <= middleCount);
alpha += n;

Powered by Google App Engine
This is Rietveld 408576698