Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: src/pipe/SkGPipeWrite.cpp

Issue 23484007: call drawRect to try GrAARectRenderer if the path is a rect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: if the path is a rect, call drawRect in SkCanvas::drawPath for potential accelerated rasterization … Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 58ba102988c8f6a32b586f9852e70d360f69fca3..58c5420ef7d36ea6f7da6641f3e835ec9017b851 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -225,9 +225,9 @@ public:
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
- virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
- virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
@@ -716,7 +716,7 @@ void SkGPipeCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
}
}
-void SkGPipeCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
+void SkGPipeCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
NOTIFY_SETUP(this);
this->writePaint(paint);
if (this->needOpBytes(sizeof(SkRect))) {
@@ -734,7 +734,7 @@ void SkGPipeCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
-void SkGPipeCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
+void SkGPipeCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
NOTIFY_SETUP(this);
this->writePaint(paint);
if (this->needOpBytes(path.writeToMemory(NULL))) {

Powered by Google App Engine
This is Rietveld 408576698