Debugger improvements

This CL:
  improves the 'SaveAs' functionality
  allows switching between # and offset indexing in the command list
  minor nit cleanup

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/211383003

git-svn-id: http://skia.googlecode.com/svn/trunk@13950 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index ac3083e..d89cf94 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -26,11 +26,18 @@
     void toggleFilter(bool toggle) { fFilter = toggle; }
 
     void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; }
+    bool getMegaVizMode() const { return fMegaVizMode; }
 
     /**
      * Enable or disable overdraw visualization
      */
     void setOverdrawViz(bool overdrawViz) { fOverdrawViz = overdrawViz; }
+    bool getOverdrawViz() const { return fOverdrawViz; }
+
+    void setOutstandingSaveCount(int saveCount) { fOutstandingSaveCount = saveCount; }
+    int getOutstandingSaveCount() const { return fOutstandingSaveCount; }
+
+    void setPicture(SkPicture* picture) { fPicture = picture; }
 
     /**
      * Enable or disable texure filtering override
@@ -118,6 +125,11 @@
     SkTArray<SkString>* getDrawCommandsAsStrings() const;
 
     /**
+     * Returns an array containing an offset (in the SkPicture) for each command
+     */
+    SkTDArray<size_t>* getDrawCommandOffsets() const;
+
+    /**
         Returns length of draw command vector.
      */
     int getSize() const {
@@ -250,6 +262,7 @@
 
 private:
     SkTDArray<SkDrawCommand*> fCommandVector;
+    SkPicture* fPicture;
     int fWidth;
     int fHeight;
     bool fFilter;
@@ -297,6 +310,13 @@
      */
     void applyUserTransform(SkCanvas* canvas);
 
+    size_t getOpID() const {
+        if (NULL != fPicture) {
+            return fPicture->EXPERIMENTAL_curOpID();
+        }
+        return 0;
+    }
+
     typedef SkCanvas INHERITED;
 };