From f510149da8d32f60f08d0a809eb037496079af3c Mon Sep 17 00:00:00 2001 From: Ruiqi Mao Date: Fri, 29 Jun 2018 14:32:21 -0400 Subject: 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 Reviewed-by: Robert Phillips Commit-Queue: Ruiqi Mao --- include/utils/SkLuaCanvas.h | 3 ++- include/utils/SkNWayCanvas.h | 3 ++- include/utils/SkNoDrawCanvas.h | 3 ++- include/utils/SkPaintFilterCanvas.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'include/utils') diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h index 2fef2c0785..e29e0b5eb3 100644 --- a/include/utils/SkLuaCanvas.h +++ b/include/utils/SkLuaCanvas.h @@ -58,7 +58,8 @@ protected: const SkPaint*, SrcRectConstraint) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, const SkPaint*) override; - void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override; + void onDrawVerticesObject(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode, + const SkPaint&) override; void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override; void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override; diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index e6a6b9962e..188c0a102c 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -78,7 +78,8 @@ protected: const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, const SkPaint*) override; - void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override; + void onDrawVerticesObject(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode, + const SkPaint&) override; void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkRect*, const SkPaint*) override; void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override; diff --git a/include/utils/SkNoDrawCanvas.h b/include/utils/SkNoDrawCanvas.h index 518d090786..0e86ed65e7 100644 --- a/include/utils/SkNoDrawCanvas.h +++ b/include/utils/SkNoDrawCanvas.h @@ -75,7 +75,8 @@ protected: const SkPaint*) override {} void onDrawBitmapLattice(const SkBitmap&, const Lattice&, const SkRect&, const SkPaint*) override {} - void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override {} + void onDrawVerticesObject(const SkVertices*, const SkMatrix*, int, SkBlendMode, + const SkPaint&) override {} void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkRect*, const SkPaint*) override {} void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override {} diff --git a/include/utils/SkPaintFilterCanvas.h b/include/utils/SkPaintFilterCanvas.h index 72c9784725..4728792013 100644 --- a/include/utils/SkPaintFilterCanvas.h +++ b/include/utils/SkPaintFilterCanvas.h @@ -88,7 +88,8 @@ protected: const SkPaint*) override; void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&, const SkPaint*) override; - void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override; + void onDrawVerticesObject(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode, + const SkPaint&) override; void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode, const SkPaint& paint) override; -- cgit v1.2.3