Loading libs/hwui/DamageAccumulator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ void DamageAccumulator::applyRenderNodeTransform(DirtyStack* frame) { const RenderProperties& props = frame->renderNode->properties(); // Perform clipping if (props.getClipToBounds() && !frame->pendingDirty.isEmpty()) { if (props.getClipDamageToBounds() && !frame->pendingDirty.isEmpty()) { if (!frame->pendingDirty.intersect(0, 0, props.getWidth(), props.getHeight())) { frame->pendingDirty.setEmpty(); } Loading libs/hwui/RenderNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ void RenderNode::prepareTree(TreeInfo& info) { void RenderNode::damageSelf(TreeInfo& info) { if (isRenderable() && properties().getAlpha() > 0) { if (properties().getClipToBounds()) { if (properties().getClipDamageToBounds()) { info.damageAccumulator->dirty(0, 0, properties().getWidth(), properties().getHeight()); } else { // Hope this is big enough? Loading libs/hwui/RenderProperties.h +10 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include "Rect.h" #include "RevealClip.h" #include "Outline.h" #include "utils/MathUtils.h" class SkBitmap; class SkColorFilter; Loading Loading @@ -526,6 +527,15 @@ public: return mLayerProperties; } // Returns true if damage calculations should be clipped to bounds // TODO: Figure out something better for getZ(), as children should still be // clipped to this RP's bounds. But as we will damage -INT_MAX to INT_MAX // for this RP's getZ() anyway, this can be optimized when we have a // Z damage estimate instead of INT_MAX bool getClipDamageToBounds() const { return getClipToBounds() && (getZ() <= 0 || getOutline().isEmpty()); } private: // Rendering properties Loading Loading
libs/hwui/DamageAccumulator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ void DamageAccumulator::applyRenderNodeTransform(DirtyStack* frame) { const RenderProperties& props = frame->renderNode->properties(); // Perform clipping if (props.getClipToBounds() && !frame->pendingDirty.isEmpty()) { if (props.getClipDamageToBounds() && !frame->pendingDirty.isEmpty()) { if (!frame->pendingDirty.intersect(0, 0, props.getWidth(), props.getHeight())) { frame->pendingDirty.setEmpty(); } Loading
libs/hwui/RenderNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ void RenderNode::prepareTree(TreeInfo& info) { void RenderNode::damageSelf(TreeInfo& info) { if (isRenderable() && properties().getAlpha() > 0) { if (properties().getClipToBounds()) { if (properties().getClipDamageToBounds()) { info.damageAccumulator->dirty(0, 0, properties().getWidth(), properties().getHeight()); } else { // Hope this is big enough? Loading
libs/hwui/RenderProperties.h +10 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include "Rect.h" #include "RevealClip.h" #include "Outline.h" #include "utils/MathUtils.h" class SkBitmap; class SkColorFilter; Loading Loading @@ -526,6 +527,15 @@ public: return mLayerProperties; } // Returns true if damage calculations should be clipped to bounds // TODO: Figure out something better for getZ(), as children should still be // clipped to this RP's bounds. But as we will damage -INT_MAX to INT_MAX // for this RP's getZ() anyway, this can be optimized when we have a // Z damage estimate instead of INT_MAX bool getClipDamageToBounds() const { return getClipToBounds() && (getZ() <= 0 || getOutline().isEmpty()); } private: // Rendering properties Loading