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); |