diff options
author | Ruiqi Mao <ruiqimao@google.com> | 2018-06-29 14:32:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-29 19:34:28 +0000 |
commit | f510149da8d32f60f08d0a809eb037496079af3c (patch) | |
tree | 13b3670a481f3bae652968165d04f9ca4890d9bf /src/xps | |
parent | 38f118a2e7f986b06d69d0af41ec2d1af53dac39 (diff) |
skeletal animation support added to API and software backend
SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices.
SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights.
Bug: skia:
Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea
Reviewed-on: https://skia-review.googlesource.com/137221
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Diffstat (limited to 'src/xps')
-rw-r--r-- | src/xps/SkXPSDevice.cpp | 6 | ||||
-rw-r--r-- | src/xps/SkXPSDevice.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index 36d1bd171f..797ff38483 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -1156,9 +1156,11 @@ void SkXPSDevice::drawPoints(SkCanvas::PointMode mode, draw(this, &SkDraw::drawPoints, mode, count, points, paint, this); } -void SkXPSDevice::drawVertices(const SkVertices* v, SkBlendMode blendMode, const SkPaint& paint) { +void SkXPSDevice::drawVertices(const SkVertices* v, const SkMatrix* bones, int boneCount, + SkBlendMode blendMode, const SkPaint& paint) { draw(this, &SkDraw::drawVertices, v->mode(), v->vertexCount(), v->positions(), v->texCoords(), - v->colors(), blendMode, v->indices(), v->indexCount(), paint); + v->colors(), v->boneIndices(), v->boneWeights(), blendMode, v->indices(), v->indexCount(), + paint, bones, boneCount); } void SkXPSDevice::drawPaint(const SkPaint& origPaint) { diff --git a/src/xps/SkXPSDevice.h b/src/xps/SkXPSDevice.h index 81e881ea82..03de5f1dcb 100644 --- a/src/xps/SkXPSDevice.h +++ b/src/xps/SkXPSDevice.h @@ -100,7 +100,8 @@ protected: void drawPosText(const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) override; - void drawVertices(const SkVertices*, SkBlendMode, const SkPaint&) override; + void drawVertices(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode, + const SkPaint&) override; void drawDevice(SkBaseDevice*, int x, int y, const SkPaint&) override; |