| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index 89548ab5c956ee4fd066cef2774746ef8264de18..90bf8c042e498cc2e1ec3f2547f1ea586a919b51 100644
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -1002,9 +1002,9 @@ void GrContext::drawVertices(const GrPaint& paint,
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| void GrContext::drawRRect(const GrPaint& paint,
|
| - const SkRRect& rect,
|
| + const SkRRect& rrect,
|
| const SkStrokeRec& stroke) {
|
| - if (rect.isEmpty()) {
|
| + if (rrect.isEmpty()) {
|
| return;
|
| }
|
|
|
| @@ -1014,15 +1014,41 @@ void GrContext::drawRRect(const GrPaint& paint,
|
|
|
| GR_CREATE_TRACE_MARKER("GrContext::drawRRect", target);
|
|
|
| - if (!fOvalRenderer->drawSimpleRRect(target, this, paint.isAntiAlias(), rect, stroke)) {
|
| + if (!fOvalRenderer->drawRRect(target, this, paint.isAntiAlias(), rrect, stroke)) {
|
| SkPath path;
|
| - path.addRRect(rect);
|
| + path.addRRect(rrect);
|
| this->internalDrawPath(target, paint.isAntiAlias(), path, stroke);
|
| }
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| +void GrContext::drawDRRect(const GrPaint& paint,
|
| + const SkRRect& outer,
|
| + const SkRRect& inner) {
|
| + if (outer.isEmpty()) {
|
| + return;
|
| + }
|
| +
|
| + AutoRestoreEffects are;
|
| + AutoCheckFlush acf(this);
|
| + GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW, &are, &acf);
|
| +
|
| + GR_CREATE_TRACE_MARKER("GrContext::drawDRRect", target);
|
| +
|
| + if (!fOvalRenderer->drawDRRect(target, this, paint.isAntiAlias(), outer, inner)) {
|
| + SkPath path;
|
| + path.addRRect(inner);
|
| + path.addRRect(outer);
|
| + path.setFillType(SkPath::kEvenOdd_FillType);
|
| +
|
| + SkStrokeRec fillRec(SkStrokeRec::kFill_InitStyle);
|
| + this->internalDrawPath(target, paint.isAntiAlias(), path, fillRec);
|
| + }
|
| +}
|
| +
|
| +///////////////////////////////////////////////////////////////////////////////
|
| +
|
| void GrContext::drawOval(const GrPaint& paint,
|
| const SkRect& oval,
|
| const SkStrokeRec& stroke) {
|
|
|