aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRectPriv.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-02-26 17:00:58 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-27 15:11:39 +0000
commit0a3b12bbcec77cb7007e0c3421a84affdc27a146 (patch)
tree7ab24e63085e13961632cbb74d99e22561a72bd5 /src/core/SkRectPriv.h
parent222346541911c7908418a2ba9d60d27b56821998 (diff)
keep points as floats until after clipping
Bug: oss-fuzz:6539 Change-Id: Ia91dee2a023c9b17d06948c455b8ea6a1b213e0d Reviewed-on: https://skia-review.googlesource.com/110501 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkRectPriv.h')
-rw-r--r--src/core/SkRectPriv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkRectPriv.h b/src/core/SkRectPriv.h
index d2a2ce4665..3bf90f8be7 100644
--- a/src/core/SkRectPriv.h
+++ b/src/core/SkRectPriv.h
@@ -47,7 +47,8 @@ public:
r->fBottom = SkMaxScalar(pt.fY, r->fBottom);
}
- // conservative check. will return false for very large values that "could" fit
+ // Conservative check if r can be expressed in fixed-point.
+ // Will return false for very large values that might have fit
static bool FitsInFixed(const SkRect& r) {
return SkFitsInFixed(r.fLeft) && SkFitsInFixed(r.fTop) &&
SkFitsInFixed(r.fRight) && SkFitsInFixed(r.fBottom);