diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-06 18:56:37 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-06 18:56:37 +0000 |
commit | 1607863b608b7db6c813228768ed5d72997bbc82 (patch) | |
tree | dfe7f47dcb9e9d07bf9fb92194666cb8e7b73556 /src/core | |
parent | 9791291347db8b5e92f16b139df30e28186626c8 (diff) |
rename hasValidCoordinates to isFinite (on SkRect) and reimplement for speed
git-svn-id: http://skia.googlecode.com/svn/trunk@2811 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 | ||||
-rw-r--r-- | src/core/SkRect.cpp | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 70ee430bfb..f382893f8c 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1068,7 +1068,7 @@ void SkCanvas::computeLocalClipBoundsCompareType(EdgeType et) const { */ bool SkCanvas::quickReject(const SkRect& rect, EdgeType et) const { - if (!rect.hasValidCoordinates()) + if (!rect.isFinite()) return true; if (fMCRec->fRasterClip->isEmpty()) { diff --git a/src/core/SkRect.cpp b/src/core/SkRect.cpp index fab1412715..5e3d93c339 100644 --- a/src/core/SkRect.cpp +++ b/src/core/SkRect.cpp @@ -37,13 +37,6 @@ void SkIRect::sort() { ///////////////////////////////////////////////////////////////////////////// -bool SkRect::hasValidCoordinates() const { - return SkScalarIsFinite(fLeft) && - SkScalarIsFinite(fTop) && - SkScalarIsFinite(fRight) && - SkScalarIsFinite(fBottom); -} - void SkRect::sort() { if (fLeft > fRight) { SkTSwap<SkScalar>(fLeft, fRight); |