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

Unified Diff: src/core/SkCanvas.cpp

Issue 13852049: Add GPU support for roundrects (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add oval check to SkCanvas Created 7 years, 8 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
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
===================================================================
--- src/core/SkCanvas.cpp (revision 8845)
+++ src/core/SkCanvas.cpp (working copy)
@@ -1581,12 +1581,20 @@
if (rrect.isRect()) {
// call the non-virtual version
this->SkCanvas::drawRect(rrect.getBounds(), paint);
- } else {
- SkPath path;
- path.addRRect(rrect);
+ return;
+ } else if (rrect.isOval()) {
// call the non-virtual version
- this->SkCanvas::drawPath(path, paint);
+ this->SkCanvas::drawOval(rrect.getBounds(), paint);
+ return;
}
+
+ LOOPER_BEGIN(paint, SkDrawFilter::kRRect_Type)
+
+ while (iter.next()) {
+ iter.fDevice->drawRRect(iter, rrect, looper.paint());
+ }
+
+ LOOPER_END
}
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698