diff options
| author | 2014-04-11 08:54:47 -0700 | |
|---|---|---|
| committer | 2014-04-11 12:57:53 -0700 | |
| commit | f7483e3af0513a1baa8341d403df2e0c0896a9ff (patch) | |
| tree | 1e528710efbfe016882e4e389c2c647a9c4a78b3 /libs/hwui/RenderNode.cpp | |
| parent | 23d2dd3da15b4312cc55c4d7b0bcf70719655e65 (diff) | |
Simplify matrix calculations
Bug: 13913604
Change-Id: I2c0f85a34e1e520050a5a6131306d6b7c352d827
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
| -rw-r--r-- | libs/hwui/RenderNode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |