VectorDrawable native rendering - Step 4 of MANY
This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
on RenderThread, all the property changes on VD can be reflected on the screen.
TODO:
- Implement reverse and reset for AVD.
Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
diff --git a/libs/hwui/Canvas.h b/libs/hwui/Canvas.h
index 9dfe454..d7e2f09 100644
--- a/libs/hwui/Canvas.h
+++ b/libs/hwui/Canvas.h
@@ -43,6 +43,13 @@
} // namespace SaveFlags
+namespace uirenderer {
+namespace VectorDrawable {
+class Tree;
+};
+};
+typedef uirenderer::VectorDrawable::Tree VectorDrawableRoot;
+
class ANDROID_API Canvas {
public:
virtual ~Canvas() {};
@@ -185,6 +192,11 @@
*/
virtual bool drawTextAbsolutePos() const = 0;
+ /**
+ * Draws a VectorDrawable onto the canvas.
+ */
+ virtual void drawVectorDrawable(VectorDrawableRoot* tree);
+
protected:
void drawTextDecorations(float x, float y, float length, const SkPaint& paint);
};