summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-11-04 19:46:47 +0000
committer android-build-merger <android-build-merger@google.com> 2015-11-04 19:46:47 +0000
commit34e9b5b2e418dd43e374dcbb3be27710c53d4b9c (patch)
treecc6be44d12f72910c4071b6371ff1512cfc2f8a0 /libs/hwui/RenderNode.cpp
parent289c3ba2c4b4d97108fc79977339e7bf7b585f7f (diff)
parenta853bb450ce7e6f06220a86dcc171a837d30511b (diff)
Merge "Early return when the scale is 0." into mnc-dr-dev am: 10eb6ab94b am: 8b581e2bc7
am: a853bb450c * commit 'a853bb450ce7e6f06220a86dcc171a837d30511b': Early return when the scale is 0.
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp9
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;