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

Unified Diff: src/gpu/GrContext.cpp

Issue 13852049: Add GPU support for roundrects (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove some unnecessary checks 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
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 8834)
+++ src/gpu/GrContext.cpp (working copy)
@@ -970,6 +970,22 @@
///////////////////////////////////////////////////////////////////////////////
+void GrContext::drawRRect(const GrPaint& paint,
robertphillips 2013/04/24 15:13:30 spaces
jvanverth1 2013/04/24 19:02:27 Done.
+ const GrRRect& rect,
+ const SkStrokeRec& stroke) {
+
+ GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
+ GrDrawState::AutoStageDisable atr(fDrawState);
bsalomon 2013/04/24 14:36:38 I don't think we need this. Other draws will call
+
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698