diff options
author | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-19 15:07:30 +0000 |
---|---|---|
committer | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-19 15:07:30 +0000 |
commit | 4ecd42e4bf41ef5ad92bfd67bdcf365c8c6d2864 (patch) | |
tree | 0f90d8db18d83c96a6ce1a00e442ea60de50eae6 /include/core/SkScalar.h | |
parent | 56a2e0de631a647aa04e98ec123f3544273f26ca (diff) |
Fix for displacement mapping
Fixed the skia displacement map effect to match the WebKit displacement map fix.
Review URL: https://codereview.chromium.org/12787007
git-svn-id: http://skia.googlecode.com/svn/trunk@8225 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkScalar.h')
-rw-r--r-- | include/core/SkScalar.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h index b775472139..a699fe9a99 100644 --- a/include/core/SkScalar.h +++ b/include/core/SkScalar.h @@ -132,6 +132,7 @@ #define SkScalarFloorToInt(x) sk_float_floor2int(x) #define SkScalarCeilToInt(x) sk_float_ceil2int(x) #define SkScalarRoundToInt(x) sk_float_round2int(x) + #define SkScalarTruncToInt(x) static_cast<int>(x) /** Returns the absolute value of the specified SkScalar */ @@ -248,6 +249,7 @@ #define SkScalarFloorToInt(x) SkFixedFloorToInt(x) #define SkScalarCeilToInt(x) SkFixedCeilToInt(x) #define SkScalarRoundToInt(x) SkFixedRoundToInt(x) + #define SkScalarTruncToInt(x) (((x) < 0) ? SkScalarCeilToInt(x) : SkScalarFloorToInt(x)) #define SkScalarAbs(x) SkFixedAbs(x) #define SkScalarCopySign(x, y) SkCopySign32(x, y) |