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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 2257023003: Plumb drawArc to SkDevice (Closed) Base URL: https://chromium.googlesource.com/skia.git@distance
Patch Set: working Created 4 years, 4 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/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 520451cb6127e6f525e6b48c6064bbfc9e2ac473..6eea2f26993cef3d13d4ed2a1464df5ffc12a9ad 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -428,6 +428,19 @@ void SkPictureRecord::onDrawOval(const SkRect& oval, const SkPaint& paint) {
this->validate(initialOffset, size);
}
+void SkPictureRecord::onDrawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
+ bool useCenter, const SkPaint& paint) {
+ // op + paint index + bool (use center) + rect + start + sweep
+ size_t size = 3 * kUInt32Size + sizeof(oval) + sizeof(startAngle) + sizeof(sweepAngle);
+ size_t initialOffset = this->addDraw(DRAW_ARC, &size);
+ this->addPaint(paint);
+ this->addRect(oval);
+ this->addScalar(startAngle);
+ this->addScalar(sweepAngle);
+ this->addBool(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);

Powered by Google App Engine
This is Rietveld 408576698