Implement SkiaCanvasProxy::onDrawArc

Test: UiRendering CTS SweepTests with picture mode turned on and
drawBitmapMesh turned off (it's not implemented yet).

This should fix BUG:34306056, and part of BUG:34871089 (the drawArc part
of SweepTests in picture mode).

BUG:34306056
BUG:34871089

Change-Id: I8fdcf72ddb4a0bfccedfd7e4e374a1ec5df17d75
(cherry picked from commit 538b6359cf81b14322141089161f20291295d6d3)
This commit is contained in:
Yuqian Li
2017-02-03 15:01:41 -05:00
committed by Chris Craik
parent 8e24dbdc97
commit 9969111d9c
2 changed files with 8 additions and 0 deletions

View File

@@ -103,6 +103,12 @@ void SkiaCanvasProxy::onDrawRRect(const SkRRect& roundRect, const SkPaint& paint
}
}
void SkiaCanvasProxy::onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sweepAngle,
bool useCenter, const SkPaint& paint) {
mCanvas->drawArc(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom,
startAngle, sweepAngle, useCenter, paint);
}
void SkiaCanvasProxy::onDrawPath(const SkPath& path, const SkPaint& paint) {
mCanvas->drawPath(path, paint);
}

View File

@@ -60,6 +60,8 @@ protected:
virtual void onDrawRect(const SkRect&, const SkPaint&) override;
virtual void onDrawRRect(const SkRRect&, const SkPaint&) override;
virtual void onDrawPath(const SkPath& path, const SkPaint&) override;
virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAngle, bool useCenter,
const SkPaint&) override;
virtual void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) override;
virtual void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,