aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClip.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-10-31 20:56:54 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-31 20:57:06 +0000
commite26062a169e2ff15436b715ea237a0342a4abf55 (patch)
tree6504a5444d2090b520f3f8b586844c3f5acbe67b /src/gpu/GrClip.h
parentbef063af14d0608a5c40fe4473fbfaf1db591603 (diff)
Revert "Fix int overflow issues with clip and path bounds."
This reverts commit b1fc36829de69da5376019403fdd649c06f4cf1b. Reason for revert: I hate to revert this, but I think it's caused some layout test diffs that are holding up the roll. https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/17909/layout-test-results/results.html Original change's description: > Fix int overflow issues with clip and path bounds. > > * Clamp scissor clip bounds to query bounds (which are RT bounds) > * 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: I4c512d05c5609a5a466393408282101697ebea83 > Reviewed-on: https://skia-review.googlesource.com/65506 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5c15219cdbe92811284130bce1e984823f0c4d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/65920 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
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 &&