If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance.

R=bsalomon@google.com, robertphillips@google.com, reed@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11842 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 705f49a..2b17b6f 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -182,8 +182,6 @@
 
     virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
 
-    virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
-
     virtual void drawPicture(SkPicture& picture) SK_OVERRIDE;
 
     virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
@@ -196,8 +194,6 @@
                               const SkScalar xpos[], SkScalar constY,
                               const SkPaint&) SK_OVERRIDE;
 
-    virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
-
     virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE;
 
     virtual void drawSprite(const SkBitmap&, int left, int top,
@@ -235,6 +231,11 @@
     static const int kVizImageHeight = 256;
     static const int kVizImageWidth = 256;
 
+protected:
+    virtual void onDrawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
+
+    virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
+
 private:
     SkTDArray<SkDrawCommand*> fCommandVector;
     int fHeight;