diff options
author | 2013-10-22 13:19:12 +0000 | |
---|---|---|
committer | 2013-10-22 13:19:12 +0000 | |
commit | ad254fee73ad70a45acba69dccb9b65f88c3a92a (patch) | |
tree | 12b18a7e1d9f810991864d61120bd74a7d72a1b1 /src/utils/debugger/SkDebugCanvas.h | |
parent | db6fa1729a5117e1bdacd6c237373812cd44a7c0 (diff) |
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
Diffstat (limited to 'src/utils/debugger/SkDebugCanvas.h')
-rw-r--r-- | src/utils/debugger/SkDebugCanvas.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h index 7d1166286a..93444ac10b 100644 --- a/src/utils/debugger/SkDebugCanvas.h +++ b/src/utils/debugger/SkDebugCanvas.h @@ -189,8 +189,6 @@ public: 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 @@ public: 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 @@ public: 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; |