Early return when the scale is 0.

b/24534579

Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index ddc7ecd..bf1b4d0 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -725,7 +725,9 @@
 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;
     }
@@ -915,7 +917,10 @@
     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;