Chromium Code Reviews| Index: include/gpu/GrClip.h |
| diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h |
| index 03b9f65b9c4a99287a6cf87a893fe818cbdf6fcf..5f0a881653cf04a007434e68d5cc9af7312ed378 100644 |
| --- a/include/gpu/GrClip.h |
| +++ b/include/gpu/GrClip.h |
| @@ -129,12 +129,12 @@ public: |
| */ |
| template<typename TRect> constexpr static bool IsInsideClip(const TRect& innerClipBounds, |
| const SkRect& queryBounds) { |
| - return innerClipBounds.fRight - innerClipBounds.fLeft >= kBoundsTolerance && |
| - innerClipBounds.fBottom - innerClipBounds.fTop >= kBoundsTolerance && |
| - innerClipBounds.fLeft <= queryBounds.fLeft + kBoundsTolerance && |
| - innerClipBounds.fTop <= queryBounds.fTop + kBoundsTolerance && |
| - innerClipBounds.fRight >= queryBounds.fRight - kBoundsTolerance && |
| - innerClipBounds.fBottom >= queryBounds.fBottom - kBoundsTolerance; |
| + return innerClipBounds.fRight - innerClipBounds.fLeft > kBoundsTolerance && |
| + innerClipBounds.fBottom - innerClipBounds.fTop > kBoundsTolerance && |
| + innerClipBounds.fLeft < queryBounds.fLeft + kBoundsTolerance && |
| + innerClipBounds.fTop < queryBounds.fTop + kBoundsTolerance && |
| + innerClipBounds.fRight > queryBounds.fRight - kBoundsTolerance && |
| + innerClipBounds.fBottom > queryBounds.fBottom - kBoundsTolerance; |
| } |
| /** |
| @@ -145,12 +145,12 @@ public: |
| */ |
| template<typename TRect> constexpr static bool IsOutsideClip(const TRect& outerClipBounds, |
| const SkRect& queryBounds) { |
| - return outerClipBounds.fRight - outerClipBounds.fLeft < kBoundsTolerance || |
| - outerClipBounds.fBottom - outerClipBounds.fTop < kBoundsTolerance || |
| - outerClipBounds.fLeft > queryBounds.fRight - kBoundsTolerance || |
| - outerClipBounds.fTop > queryBounds.fBottom - kBoundsTolerance || |
| - outerClipBounds.fRight < queryBounds.fLeft + kBoundsTolerance || |
| - outerClipBounds.fBottom < queryBounds.fTop + kBoundsTolerance; |
| + return outerClipBounds.fRight - outerClipBounds.fLeft <= kBoundsTolerance || |
| + outerClipBounds.fBottom - outerClipBounds.fTop <= kBoundsTolerance || |
| + outerClipBounds.fLeft >= queryBounds.fRight - kBoundsTolerance || |
| + outerClipBounds.fTop >= queryBounds.fBottom - kBoundsTolerance || |
| + outerClipBounds.fRight <= queryBounds.fLeft + kBoundsTolerance || |
| + outerClipBounds.fBottom <= queryBounds.fTop + kBoundsTolerance; |
|
csmartdalton
2016/08/08 05:26:55
Switching to <= and >= ought to remove the case wh
|
| } |
| /** |