summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/DisplayList.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index d3d2613..a156341 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -418,11 +418,16 @@ void DisplayList::setViewProperties(OpenGLRenderer& renderer, T& handler,
renderer.concatMatrix(mAnimationMatrix);
}
if (mMatrixFlags != 0) {
- if (mMatrixFlags == TRANSLATION) {
- renderer.translate(mTranslationX, mTranslationY, mTranslationZ);
- } else {
- if (Caches::getInstance().propertyEnable3d) {
+ if (Caches::getInstance().propertyEnable3d) {
+ if (mMatrixFlags == TRANSLATION) {
+ renderer.translate(mTranslationX, mTranslationY, mTranslationZ);
+ } else {
renderer.concatMatrix(mTransform);
+ }
+ } else {
+ // avoid setting translationZ, use SkMatrix
+ if (mMatrixFlags == TRANSLATION) {
+ renderer.translate(mTranslationX, mTranslationY, 0);
} else {
renderer.concatMatrix(mTransformMatrix);
}