| Index: third_party/WebKit/Source/wtf/SaturatedArithmetic.h
|
| diff --git a/third_party/WebKit/Source/wtf/SaturatedArithmetic.h b/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
|
| index a627b532ddc9e310b6210422ed4bd847cec7a7dd..eec1c9b3606eaaa5a2956aedcc2788c543e87437 100644
|
| --- a/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
|
| +++ b/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
|
| @@ -73,6 +73,13 @@ ALWAYS_INLINE int32_t saturatedSubtraction(int32_t a, int32_t b)
|
| return result;
|
| }
|
|
|
| +ALWAYS_INLINE int32_t saturatedNegative(int32_t a)
|
| +{
|
| + if (UNLIKELY(a == std::numeric_limits<int>::min()))
|
| + return std::numeric_limits<int>::max();
|
| + return -a;
|
| +}
|
| +
|
| inline int getMaxSaturatedSetResultForTesting(int FractionalShift)
|
| {
|
| // For C version the set function maxes out to max int, this differs from
|
|
|