diff options
author | 2018-09-27 12:27:36 -0700 | |
---|---|---|
committer | 2018-10-02 17:12:15 -0700 | |
commit | adfe1d991bbc65dbf80f16f493b88a72adc701d6 (patch) | |
tree | 15fe71348a6951b6df9c0b8785833839473862eb /libs/hwui/SkiaCanvas.cpp | |
parent | 2616b08d4d8295dd8cd14565e49617e8ac1ad68c (diff) |
Added support for Canvas#drawDoubleRoundRect in application Canvas API
Exposed Skia's underlying drawDRRect method used to draw a double
rounded rectangle
Bug: 117181396
Test: Added test case to verify Canvas#drawDRRect and re-ran CanvasTests
Change-Id: I4e1954c8ffc82811dc541488d1df9b37309faf51
Diffstat (limited to 'libs/hwui/SkiaCanvas.cpp')
-rw-r--r-- | libs/hwui/SkiaCanvas.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 17f1a3b4db3c..2e5aef5347d5 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -504,6 +504,11 @@ void SkiaCanvas::drawRoundRect(float left, float top, float right, float bottom, mCanvas->drawRoundRect(rect, rx, ry, *filterPaint(paint)); } +void SkiaCanvas::drawDoubleRoundRect(const SkRRect& outer, const SkRRect& inner, + const SkPaint& paint) { + mCanvas->drawDRRect(outer, inner, *filterPaint(paint)); +} + void SkiaCanvas::drawCircle(float x, float y, float radius, const SkPaint& paint) { if (CC_UNLIKELY(radius <= 0 || paint.nothingToDraw())) return; mCanvas->drawCircle(x, y, radius, *filterPaint(paint)); |