fix winding bug in lineclipper
expose path.dump() all the time
UP arrow now toggles a grid of clip rects in sample app
git-svn-id: http://skia.googlecode.com/svn/trunk@443 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 63c3eb0..55be129 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1222,30 +1222,6 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-#ifdef SK_DEBUG
-
-void SkPath::validate() const {
- SkASSERT(this != NULL);
- SkASSERT((fFillType & ~3) == 0);
- fPts.validate();
- fVerbs.validate();
-
- if (!fBoundsIsDirty) {
- SkRect bounds;
- compute_pt_bounds(&bounds, fPts);
- if (fPts.count() <= 1) {
- // if we're empty, fBounds may be empty but translated, so we can't
- // necessarily compare to bounds directly
- // try path.addOval(2, 2, 2, 2) which is empty, but the bounds will
- // be [2, 2, 2, 2]
- SkASSERT(bounds.isEmpty());
- SkASSERT(fBounds.isEmpty());
- } else {
- fBounds.contains(bounds);
- }
- }
-}
-
void SkPath::dump(bool forceClose, const char title[]) const {
Iter iter(*this, forceClose);
SkPoint pts[4];
@@ -1306,4 +1282,31 @@
SkDebugf("path: done %s\n", title ? title : "");
}
+void SkPath::dump() const {
+ this->dump(false);
+}
+
+#ifdef SK_DEBUG
+void SkPath::validate() const {
+ SkASSERT(this != NULL);
+ SkASSERT((fFillType & ~3) == 0);
+ fPts.validate();
+ fVerbs.validate();
+
+ if (!fBoundsIsDirty) {
+ SkRect bounds;
+ compute_pt_bounds(&bounds, fPts);
+ if (fPts.count() <= 1) {
+ // if we're empty, fBounds may be empty but translated, so we can't
+ // necessarily compare to bounds directly
+ // try path.addOval(2, 2, 2, 2) which is empty, but the bounds will
+ // be [2, 2, 2, 2]
+ SkASSERT(bounds.isEmpty());
+ SkASSERT(fBounds.isEmpty());
+ } else {
+ fBounds.contains(bounds);
+ }
+ }
+}
#endif
+