Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: include/core/SkCanvas.h

Issue 2241473002: Delete quickRejectY() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Inline quickRejectY logic Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index c3f8599db4d31be8c0b708c97bfce64efe24e334..d19830deab4fbbddfa56e9dd1bfce76a9b669e77 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -556,40 +556,6 @@ public:
*/
bool quickReject(const SkPath& path) const;
- /** Return true if the horizontal band specified by top and bottom is
- completely clipped out. This is a conservative calculation, meaning
- that it is possible that if the method returns false, the band may still
- in fact be clipped out, but the converse is not true. If this method
- returns true, then the band is guaranteed to be clipped out.
- @param top The top of the horizontal band to compare with the clip
- @param bottom The bottom of the horizontal and to compare with the clip
- @return true if the horizontal band is completely clipped out (i.e. does
- not intersect the current clip)
- */
- bool quickRejectY(SkScalar top, SkScalar bottom) const {
- SkASSERT(top <= bottom);
-
-#ifndef SK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT
- // TODO: add a hasPerspective method similar to getLocalClipBounds. This
- // would cache the SkMatrix::hasPerspective result. Alternatively, have
- // the MC stack just set a hasPerspective boolean as it is updated.
- if (this->getTotalMatrix().hasPerspective()) {
- // TODO: consider implementing some half-plane test between the
- // two Y planes and the device-bounds (i.e., project the top and
- // bottom Y planes and then determine if the clip bounds is completely
- // outside either one).
- return false;
- }
-#endif
-
- const SkRect& clipR = this->getLocalClipBounds();
- // In the case where the clip is empty and we are provided with a
- // negative top and positive bottom parameter then this test will return
- // false even though it will be clipped. We have chosen to exclude that
- // check as it is rare and would result double the comparisons.
- return top >= clipR.fBottom || bottom <= clipR.fTop;
- }
-
/** Return the bounds of the current clip (in local coordinates) in the
bounds parameter, and return true if it is non-empty. This can be useful
in a way similar to quickReject, in that it tells you that drawing
« no previous file with comments | « no previous file | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698