Fix view z translation with 3d projection disabled
The ortho projection can't handle 3d translation, so skip that step if perspective projection isn't enabled. Change-Id: I231e6bcecc82e876b697e098e034f0fd3b06efde
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user