aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClip.h
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-11-02 18:52:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-02 18:52:42 +0000
commite3a700522f6e088be00011bc98fcdc4a13bd798b (patch)
tree8d8b6348d6bb874d02085c25bbe10e073b5cc878 /src/gpu/GrClip.h
parent9d96df1f1f5a47a044e31787dbcf7d1b04766816 (diff)
Revert "Fix int overflow issues with clip and path bounds, take 2."
This reverts commit 430ad1f2065c182746e43e67ca95fb911cc55892. Reason for revert: Many bad GMs. Original change's description: > Fix int overflow issues with clip and path bounds, take 2. > > * Change IsInsideClip test to be more int overflow friendly > * Check to make sure path bounds can have representable width and height > > Bug: skia:7239 > Bug: skia:7240 > Change-Id: If8468e46bc74a428c25d466ff3756d0cad385c09 > Reviewed-on: https://skia-review.googlesource.com/66154 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I5b1a651b60340bb4230893ef5f5d2df2ce6fd241 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/67240 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/GrClip.h')
-rw-r--r--src/gpu/GrClip.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrClip.h b/src/gpu/GrClip.h
index bd7d8a1d96..2e247c82f2 100644
--- a/src/gpu/GrClip.h
+++ b/src/gpu/GrClip.h
@@ -74,8 +74,8 @@ 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 &&
+ 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 &&