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

Unified Diff: src/gpu/GrContext.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 | « src/core/SkDevice.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 8845)
+++ src/gpu/GrContext.cpp (working copy)
@@ -974,6 +974,22 @@
///////////////////////////////////////////////////////////////////////////////
+void GrContext::drawRRect(const GrPaint& paint,
+ const SkRRect& rect,
+ const SkStrokeRec& stroke) {
+
+ GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
+ GrDrawState::AutoStageDisable atr(fDrawState);
+
+ if (!fOvalRenderer->drawSimpleRRect(target, this, paint, rect, stroke)) {
+ SkPath path;
+ path.addRRect(rect);
+ this->internalDrawPath(target, paint, path, stroke);
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
void GrContext::drawOval(const GrPaint& paint,
const GrRect& oval,
const SkStrokeRec& stroke) {
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698