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

Unified Diff: src/core/SkAAClip.cpp

Issue 1893433002: In SkDraw::drawRect, use SkPath for huge rects. Base URL: https://skia.googlesource.com/skia@fixed-assert
Patch Set: Created 4 years, 8 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 | « src/core/SkAAClip.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAAClip.cpp
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp
index f71d7b61d237972a4282055a3636ed974d183d59..8372414355c68e3d560785fc433cdc299cb2448c 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -940,6 +940,17 @@ bool SkAAClip::quickContains(int left, int top, int right, int bottom) const {
#endif
}
+bool SkAAClip::quickContains(const SkRect& r) const {
+ if (this->isEmpty()) {
+ return false;
+ }
+ if (!fBounds.contains(r)) {
+ return false;
+ }
+ // If r is contained in fBounds, it has to be in range of int32.
+ return this->quickContains(r.roundOut());
+}
+
///////////////////////////////////////////////////////////////////////////////
class SkAAClip::Builder {
« no previous file with comments | « src/core/SkAAClip.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698