diff options
| author | 2016-02-05 21:31:05 +0000 | |
|---|---|---|
| committer | 2016-02-05 21:31:06 +0000 | |
| commit | 43a5591c8da267e85db9df6c93db73ca29a1bcba (patch) | |
| tree | e0bda443b122692ab29ef8a9b76bc30108b391b2 /libs/hwui/FrameBuilder.cpp | |
| parent | bb66a0edfe99a545a016376e5bdd1e76a9a141f1 (diff) | |
| parent | 766431aa57c16ece8842287a92b2e7208e3b8ac3 (diff) | |
Merge "Revert "Revert "VectorDrawable native rendering - Step 4 of MANY"""
Diffstat (limited to 'libs/hwui/FrameBuilder.cpp')
| -rw-r--r-- | libs/hwui/FrameBuilder.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/FrameBuilder.cpp b/libs/hwui/FrameBuilder.cpp index c8910cbdd337..185accec1ef6 100644 --- a/libs/hwui/FrameBuilder.cpp +++ b/libs/hwui/FrameBuilder.cpp @@ -19,6 +19,7 @@ #include "Canvas.h" #include "LayerUpdateQueue.h" #include "RenderNode.h" +#include "VectorDrawable.h" #include "renderstate/OffscreenBufferPool.h" #include "utils/FatVector.h" #include "utils/PaintUtils.h" @@ -545,6 +546,18 @@ void FrameBuilder::deferBitmapRectOp(const BitmapRectOp& op) { currentLayer().deferUnmergeableOp(mAllocator, bakedState, OpBatchType::Bitmap); } +void FrameBuilder::deferVectorDrawableOp(const VectorDrawableOp& op) { + const SkBitmap& bitmap = op.vectorDrawable->getBitmapUpdateIfDirty(); + SkPaint* paint = op.vectorDrawable->getPaint(); + const BitmapRectOp* resolvedOp = new (mAllocator) BitmapRectOp(op.unmappedBounds, + op.localMatrix, + op.localClip, + paint, + &bitmap, + Rect(bitmap.width(), bitmap.height())); + deferBitmapRectOp(*resolvedOp); +} + void FrameBuilder::deferCirclePropsOp(const CirclePropsOp& op) { // allocate a temporary oval op (with mAllocator, so it persists until render), so the // renderer doesn't have to handle the RoundRectPropsOp type, and so state baking is simple. |