Index: src/core/SkPMFloat.h |
diff --git a/src/core/SkPMFloat.h b/src/core/SkPMFloat.h |
index 1d034f049ba389f7702aceeeb0dca16ed804f643..791cf1b42d628ed22f70812ae213cc0659781e83 100644 |
--- a/src/core/SkPMFloat.h |
+++ b/src/core/SkPMFloat.h |
@@ -57,6 +57,9 @@ public: |
SkPMColor get() const; // May SkASSERT(this->isValid()). Some implementations may clamp. |
SkPMColor clamped() const; // Will clamp all values to [0, 255]. Then may assert isValid(). |
+ // Like get(), but truncates instead of rounding. |
reed1
2015/03/26 13:05:10
floor or (int) ?
i.e. can you document what happen
mtklein
2015/03/26 13:26:25
Done.
// The domain of this function is (-1.0f, 2
|
+ SkPMColor trunc() const; |
+ |
// 4-at-a-time versions of get() and clamped(). Like From4PMColors(), no alignment assumed. |
static void To4PMColors( |
const SkPMFloat&, const SkPMFloat&, const SkPMFloat&, const SkPMFloat&, SkPMColor[4]); |