From 521a46750d87d3d206617d05d917ad6aad242ca4 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Thu, 17 Oct 2013 16:29:21 +0000 Subject: 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 --- src/core/SkPictureRecord.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/SkPictureRecord.cpp') diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index f7a7633faa..bf7a34eef0 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -868,7 +868,7 @@ void SkPictureRecord::drawOval(const SkRect& oval, const SkPaint& paint) { this->validate(initialOffset, size); } -void SkPictureRecord::drawRect(const SkRect& rect, const SkPaint& paint) { +void SkPictureRecord::onDrawRect(const SkRect& rect, const SkPaint& paint) { // op + paint index + rect uint32_t size = 2 * kUInt32Size + sizeof(rect); size_t initialOffset = this->addDraw(DRAW_RECT, &size); @@ -895,7 +895,7 @@ void SkPictureRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) { } } -void SkPictureRecord::drawPath(const SkPath& path, const SkPaint& paint) { +void SkPictureRecord::onDrawPath(const SkPath& path, const SkPaint& paint) { // op + paint index + path index uint32_t size = 3 * kUInt32Size; size_t initialOffset = this->addDraw(DRAW_PATH, &size); -- cgit v1.2.3