Add dump() to SkClipStack to help with debugging.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/311263015
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 4243cee..95e41e6 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -48,7 +48,10 @@
             kRRect_Type,
             //!< This element combines a path with the current clip using a set operation
             kPath_Type,
+
+            kLastType = kPath_Type
         };
+        static const int kTypeCnt = kLastType + 1;
 
         Element() {
             this->initCommon(0, SkRegion::kReplace_Op, false);
@@ -165,6 +168,14 @@
         */
         void replay(SkCanvasClipVisitor*) const;
 
+#ifdef SK_DEVELOPER
+        /**
+         * Dumps the element to SkDebugf. This is intended for Skia development debugging
+         * Don't rely on the existence of this function or the formatting of its output.
+         */
+        void dump() const;
+#endif
+
     private:
         friend class SkClipStack;
 
@@ -341,6 +352,14 @@
 
     int32_t getTopmostGenID() const;
 
+#ifdef SK_DEVELOPER
+    /**
+     * Dumps the contents of the clip stack to SkDebugf. This is intended for Skia development
+     * debugging. Don't rely on the existence of this function or the formatting of its output.
+     */
+    void dump() const;
+#endif
+
 public:
     class Iter {
     public: