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

Unified Diff: src/core/SkRegion.cpp

Issue 19366008: Add getRectCount to SkRegtion (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | « include/core/SkRegion.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRegion.cpp
===================================================================
--- src/core/SkRegion.cpp (revision 10113)
+++ src/core/SkRegion.cpp (working copy)
@@ -124,6 +124,15 @@
SkTSwap<RunHead*>(fRunHead, other.fRunHead);
}
+int SkRegion::computeRegionComplexity() const {
+ if (this->isEmpty()) {
+ return 0;
+ } else if (this->isRect()) {
+ return 1;
+ }
+ return fRunHead->getIntervalCount();
+}
+
bool SkRegion::setEmpty() {
this->freeRuns();
fBounds.set(0, 0, 0, 0);
« no previous file with comments | « include/core/SkRegion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698