diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-24 21:03:42 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-24 21:03:42 +0000 |
commit | 42bbef71c7ccba831caec84a9ab0e3ab15842de7 (patch) | |
tree | ab5e74e9d2cec2294e4088107b1f1ed2dd37e8f9 /src/core/SkCanvas.cpp | |
parent | 0b5b0ce39cea3e0eb83c70278b40fa52b3c5870d (diff) |
Enable quickRejectY in SkCanvas to be inlined.
This CL was tested against the picturePlayback bench and
showed an approx 10-13% improvement on Android when playing
back text.
Review URL: https://codereview.appspot.com/5687083
git-svn-id: http://skia.googlecode.com/svn/trunk@3259 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 6e061c2005..984549aea7 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1184,30 +1184,6 @@ bool SkCanvas::quickReject(const SkPath& path, EdgeType et) const { return path.isEmpty() || this->quickReject(path.getBounds(), et); } -bool SkCanvas::quickRejectY(SkScalar top, SkScalar bottom, EdgeType et) const { - /* current impl ignores edgetype, and relies on - getLocalClipBoundsCompareType(), which always returns a value assuming - antialiasing (worst case) - */ - - if (fMCRec->fRasterClip->isEmpty()) { - return true; - } - - SkScalarCompareType userT = SkScalarToCompareType(top); - SkScalarCompareType userB = SkScalarToCompareType(bottom); - - // check for invalid user Y coordinates (i.e. empty) - // reed: why do we need to do this check, since it slows us down? - if (userT >= userB) { - return true; - } - - // check if we are above or below the local clip bounds - const SkRectCompareType& clipR = this->getLocalClipBoundsCompareType(); - return userT >= clipR.fBottom || userB <= clipR.fTop; -} - static inline int pinIntForScalar(int x) { #ifdef SK_SCALAR_IS_FIXED if (x < SK_MinS16) { |