If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance.
Committed: http://code.google.com/p/skia/source/detail?r=11842
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/23484007
git-svn-id: http://skia.googlecode.com/svn/trunk@11904 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 7d11662..93444ac 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -189,8 +189,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[],
@@ -203,8 +201,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,
@@ -242,6 +238,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;