diff options
author | 2015-10-01 16:49:16 -0700 | |
---|---|---|
committer | 2015-11-04 18:31:50 +0000 | |
commit | cdce35a7e877ae51e194b03033bbd35b5c10ce06 (patch) | |
tree | 1eefda1826ff4dee3b0babe155f7280d276b08d2 /libs/hwui/RenderNode.cpp | |
parent | 8e7ab07ce76c20da653e098adfe38da867753305 (diff) |
Early return when the scale is 0.
b/24534579
Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
(cherry picked from commit 8d0ec389531d071529fb0a800f10733b057205d9)
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 0951fc158ace..642ec25dfe83 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -666,7 +666,9 @@ template <class T> void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler) { if (properties().getAlpha() <= 0.0f || properties().getOutline().getAlpha() <= 0.0f - || !properties().getOutline().getPath()) { + || !properties().getOutline().getPath() + || properties().getScaleX() == 0 + || properties().getScaleY() == 0) { // no shadow to draw return; } @@ -856,7 +858,10 @@ void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) { const bool useViewProperties = (!mLayer || drawLayer); if (useViewProperties) { const Outline& outline = properties().getOutline(); - if (properties().getAlpha() <= 0 || (outline.getShouldClip() && outline.isEmpty())) { + if (properties().getAlpha() <= 0 + || (outline.getShouldClip() && outline.isEmpty()) + || properties().getScaleX() == 0 + || properties().getScaleY() == 0) { DISPLAY_LIST_LOGD("%*sRejected display list (%p, %s)", handler.level() * 2, "", this, getName()); return; |