Index: src/core/SkDevice.cpp |
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp |
index a90076d44216d98cac3f41056b5e8fd0f35ac328..1f3bd613c1440669fe6e0368c4d05e5f72f1ca07 100644 |
--- a/src/core/SkDevice.cpp |
+++ b/src/core/SkDevice.cpp |
@@ -16,6 +16,7 @@ |
#include "SkLatticeIter.h" |
#include "SkMetaData.h" |
#include "SkPatchUtils.h" |
+#include "SkPathPriv.h" |
#include "SkPathMeasure.h" |
#include "SkRasterClip.h" |
#include "SkRSXform.h" |
@@ -74,16 +75,10 @@ SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info |
void SkBaseDevice::drawArc(const SkDraw& draw, const SkRect& oval, SkScalar startAngle, |
SkScalar sweepAngle, bool useCenter, const SkPaint& paint) { |
- SkASSERT(SkScalarAbs(sweepAngle) >= 0.f && SkScalarAbs(sweepAngle) < 360.f); |
SkPath path; |
- if (useCenter) { |
- path.moveTo(oval.centerX(), oval.centerY()); |
- } |
- path.arcTo(oval, startAngle, sweepAngle, !useCenter); |
- if (useCenter) { |
- path.close(); |
- } |
- path.setIsVolatile(true); |
+ bool isFillNoPathEffect = SkPaint::kFill_Style == paint.getStyle() && !paint.getPathEffect(); |
+ SkPathPriv::CreateDrawArcPath(&path, oval, startAngle, sweepAngle, useCenter, |
+ isFillNoPathEffect); |
this->drawPath(draw, path, paint); |
} |