Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e526a5b9 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Don't apply scale to glyphs when a perspective is set. Bug #8337925" into jb-mr2-dev

parents a2dba054 b09f1471
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -2633,16 +2633,7 @@ mat4 OpenGLRenderer::findBestFontTransform(const mat4& transform) const {
        fontTransform = mat4::identity();
    } else {
        if (CC_UNLIKELY(transform.isPerspective())) {
            // When the below condition is true, we are rendering text with a
            // perspective transform inside a layer (either an inline layer
            // created by Canvas.saveLayer() or a hardware layer.)
            if (hasLayer() || getTargetFbo() != 0) {
                float sx, sy;
                currentTransform().decomposeScale(sx, sy);
                fontTransform.loadScale(sx, sy, 1.0f);
            } else {
            fontTransform = mat4::identity();
            }
        } else {
            float sx, sy;
            currentTransform().decomposeScale(sx, sy);