From f7483e3af0513a1baa8341d403df2e0c0896a9ff Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 11 Apr 2014 08:54:47 -0700 Subject: Simplify matrix calculations Bug: 13913604 Change-Id: I2c0f85a34e1e520050a5a6131306d6b7c352d827 --- libs/hwui/RenderNode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/hwui/RenderNode.cpp') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 823ae7b8d0d1..2489c92362bc 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -154,8 +154,8 @@ void RenderNode::setViewProperties(OpenGLRenderer& renderer, T& handler) { } else if (properties().getAnimationMatrix()) { renderer.concatMatrix(properties().getAnimationMatrix()); } - if (properties().getMatrixFlags() != 0) { - if (properties().getMatrixFlags() == TRANSLATION) { + if (properties().hasTransformMatrix()) { + if (properties().isTransformTranslateOnly()) { renderer.translate(properties().getTranslationX(), properties().getTranslationY()); } else { renderer.concatMatrix(*properties().getTransformMatrix()); @@ -214,8 +214,8 @@ void RenderNode::applyViewPropertyTransforms(mat4& matrix, bool true3dTransform) mat4 anim(*properties().getAnimationMatrix()); matrix.multiply(anim); } - if (properties().getMatrixFlags() != 0) { - if (properties().getMatrixFlags() == TRANSLATION) { + if (properties().hasTransformMatrix()) { + if (properties().isTransformTranslateOnly()) { matrix.translate(properties().getTranslationX(), properties().getTranslationY(), true3dTransform ? properties().getTranslationZ() : 0.0f); } else { -- cgit v1.2.3-59-g8ed1b