Update filter tool to allow more flexible filtering

https://codereview.appspot.com/7227055/



git-svn-id: http://skia.googlecode.com/svn/trunk@7492 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/SkDrawCommand.h b/debugger/SkDrawCommand.h
index 98cfbc9..fba5a01 100644
--- a/debugger/SkDrawCommand.h
+++ b/debugger/SkDrawCommand.h
@@ -163,9 +163,20 @@
             const SkRect& dst, const SkPaint* paint, SkBitmap& resizedBitmap);
     virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
     virtual const SkBitmap* getBitmap() const SK_OVERRIDE;
+
+    // The non-const 'paint' method allows modification of this object's
+    // SkPaint. For this reason the ctor and setPaint method make a local copy.
+    // The 'fPaintPtr' member acts a signal that the local SkPaint is valid
+    // (since only an SkPaint* is passed into the ctor).
+    const SkPaint* paint() const { return fPaintPtr; }
+    SkPaint* paint() { return fPaintPtr; }
+
+    void setPaint(const SkPaint& paint) { fPaint = paint; fPaintPtr = &fPaint; }
+
 private:
     const SkRect* fSrc;
-    const SkPaint* fPaint;
+    SkPaint fPaint;
+    SkPaint* fPaintPtr;
     const SkBitmap* fBitmap;
     const SkRect* fDst;
     SkBitmap fResizedBitmap;
@@ -357,6 +368,9 @@
             SkCanvas::SaveFlags flags);
     virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
     virtual void trackSaveState(int* state) SK_OVERRIDE;
+
+    const SkPaint* paint() const { return fPaint; }
+
 private:
     const SkRect* fBounds;
     const SkPaint* fPaint;