diff options
Diffstat (limited to 'libs/hwui/FrameBuilder.cpp')
-rw-r--r-- | libs/hwui/FrameBuilder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/FrameBuilder.cpp b/libs/hwui/FrameBuilder.cpp index 1d8b021274fe..35ff635930ab 100644 --- a/libs/hwui/FrameBuilder.cpp +++ b/libs/hwui/FrameBuilder.cpp @@ -16,6 +16,7 @@ #include "FrameBuilder.h" +#include "DeferredLayerUpdater.h" #include "LayerUpdateQueue.h" #include "RenderNode.h" #include "VectorDrawable.h" @@ -784,14 +785,15 @@ void FrameBuilder::deferTextOnPathOp(const TextOnPathOp& op) { } void FrameBuilder::deferTextureLayerOp(const TextureLayerOp& op) { - if (CC_UNLIKELY(!op.layer->isRenderable())) return; + GlLayer* layer = static_cast<GlLayer*>(op.layerHandle->backingLayer()); + if (CC_UNLIKELY(!layer || !layer->isRenderable())) return; const TextureLayerOp* textureLayerOp = &op; // Now safe to access transform (which was potentially unready at record time) - if (!op.layer->getTransform().isIdentity()) { + if (!layer->getTransform().isIdentity()) { // non-identity transform present, so 'inject it' into op by copying + replacing matrix Matrix4 combinedMatrix(op.localMatrix); - combinedMatrix.multiply(op.layer->getTransform()); + combinedMatrix.multiply(layer->getTransform()); textureLayerOp = mAllocator.create<TextureLayerOp>(op, combinedMatrix); } BakedOpState* bakedState = tryBakeOpState(*textureLayerOp); |