Plumb drawArc to SkDevice.
Plumbs the drawArc canvas method down to SkDevice without converting to a path. Plumbs through the various recording canvas classes.
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257023003
Review-Url: https://codereview.chromium.org/2257023003
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 520451c..2140795 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -428,6 +428,20 @@
this->validate(initialOffset, size);
}
+void SkPictureRecord::onDrawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
+ bool useCenter, const SkPaint& paint) {
+ // op + paint index + rect + start + sweep + bool (as int)
+ size_t size = 2 * kUInt32Size + sizeof(oval) + sizeof(startAngle) + sizeof(sweepAngle) +
+ sizeof(int);
+ size_t initialOffset = this->addDraw(DRAW_ARC, &size);
+ this->addPaint(paint);
+ this->addRect(oval);
+ this->addScalar(startAngle);
+ this->addScalar(sweepAngle);
+ this->addInt(useCenter);
+ this->validate(initialOffset, size);
+}
+
void SkPictureRecord::onDrawRect(const SkRect& rect, const SkPaint& paint) {
// op + paint index + rect
size_t size = 2 * kUInt32Size + sizeof(rect);