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

Unified Diff: src/core/SkXfermode.cpp

Issue 1721223002: simplify/unify xferproc api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « src/core/SkSpriteBlitter4f.cpp ('k') | src/core/SkXfermode4f.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 7002e9a533b610b52f4c527e46a6628c724e5fa3..262e5265c7aeb1b541ab347ac4b2b4b248c07cde 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -928,8 +928,9 @@ static Sk4f as_4f(const SkPM4f& pm4) {
static void assert_unit(const SkPM4f& r) {
#ifdef SK_DEBUG
- const float min = 0;
- const float max = 1;
+ const float eps = 0.00001f;
+ const float min = 0 - eps;
+ const float max = 1 + eps;
for (int i = 0; i < 4; ++i) {
SkASSERT(r.fVec[i] >= min && r.fVec[i] <= max);
}
« no previous file with comments | « src/core/SkSpriteBlitter4f.cpp ('k') | src/core/SkXfermode4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698