diff options
author | 2024-11-13 11:48:29 -0500 | |
---|---|---|
committer | 2025-03-04 08:17:35 -0800 | |
commit | f088529e301e669dc2a15bff32d6e2335616ed2d (patch) | |
tree | 110d711e59df0f99ce49771c3eec39042580e561 /libs/hwui/RenderNode.cpp | |
parent | 7b30de07a245e3968071f642a530dbc43b680e61 (diff) |
Don't create layers for negative-sized RenderNodes
Fixes: 257954570
Test: n/a
Flag: EXEMPT trivial bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1895e2e9de073860cca89c9f94c0af548d6eb6aa)
Merged-In: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7
Change-Id: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 2c23864317a4..4801bd1038a3 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -186,7 +186,7 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) { // If we are not a layer OR we cannot be rendered (eg, view was detached) // we need to destroy any Layers we may have had previously if (CC_LIKELY(layerType != LayerType::RenderLayer) || CC_UNLIKELY(!isRenderable()) || - CC_UNLIKELY(properties().getWidth() == 0) || CC_UNLIKELY(properties().getHeight() == 0) || + CC_UNLIKELY(properties().getWidth() <= 0) || CC_UNLIKELY(properties().getHeight() <= 0) || CC_UNLIKELY(!properties().fitsOnLayer())) { if (CC_UNLIKELY(hasLayer())) { this->setLayerSurface(nullptr); |