Index: src/core/SkColor.cpp |
diff --git a/src/core/SkColor.cpp b/src/core/SkColor.cpp |
index 1794cd7d909c68a23f102d25cfe9e4c73ed0ed2f..9deac7a197689d9bd2f5a41b8c8bb9e429a49b48 100644 |
--- a/src/core/SkColor.cpp |
+++ b/src/core/SkColor.cpp |
@@ -141,3 +141,8 @@ SkPM4f SkColor4f::premul() const { |
dst.store(pm4.fVec); |
return pm4; |
} |
+ |
+bool SkPM4f::isUnit() const { |
mtklein
2016/01/29 15:23:00
If this is only used inside asserts, we may want t
reed1
2016/01/29 22:35:27
Gotcha. No idea if we'll need it for real, so for
|
+ auto c4 = Sk4f::Load(fVec); |
+ return (c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue(); |
+} |