diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-06-10 09:59:43 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-06-10 12:51:53 +0200 |
commit | d5c13c42f101552bb62ae5064115dcb7f7624063 (patch) | |
tree | 8037e8a433cb1a57c2476bf5817e24f09789c77d /src/quick/scenegraph | |
parent | f0c08dc2175cffadb73e06d2cc69a152002e0df0 (diff) |
Fix shifted text styles on RHI
QPointF is only 8 bytes if qreal is a float. Use QVector2D instead,
which always contains floats.
Change-Id: I342a88bd5f1cd8b0aa54308291852418cfbd0009
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp index 7fac5a3e72..5372a0e6a6 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -407,8 +407,8 @@ bool DistanceFieldShiftedStyleTextMaterialRhiShader::updateUniformData(RenderSta if (!oldMat || oldMat->fontScale() != mat->fontScale() || oldMat->shift() != mat->shift() || oldMat->textureSize() != mat->textureSize()) { - QPointF shift(1.0 / mat->fontScale() * mat->shift().x(), - 1.0 / mat->fontScale() * mat->shift().y()); + QVector2D shift(1.0 / mat->fontScale() * mat->shift().x(), + 1.0 / mat->fontScale() * mat->shift().y()); memcpy(buf->data() + 128, &shift, 8); changed = true; } |