diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2022-06-15 09:50:57 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2022-06-16 10:49:38 +0200 |
commit | 6d11ee1b0511e9985f1b88a6aa660f1bc0fe2e09 (patch) | |
tree | 1b1a2f866b8e4a8d761b07fd911dc4efd6cfd8d8 /src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderPreparationData.cpp | |
parent | 427fddb50d43aa21a90fc7356ee3cdd8a908df56 (diff) |
Fix crash when expanding glyph cache beyond one texture
The textureInfo() function was returning pointers to the
m_textures array, which would then be stored in the
m_glyphTextures map and other places in the renderer.
Then the function then later resized it, the renderer
would be riddled with dangling pointers and crash pretty
quickly.
There is a preset maximum texture count, so we just make
sure the array is the correct size to begin with and
never resize it.
In addition, this contains a port of
46d72a117df642135718b38995346267312c4808 and
9a53834f1e7fce2fc3b1ecc2a311faedbc371d37 from Qt Quick.
Note: Glyph recycling does not seem to work, so you may end
up running out of cache space. However, it will no longer crash,
but glyphs will be missing instead.
Fixes: QT3DS-4235
Change-Id: I7d9707ff95ac0838e7e6574714a06ac1c23986fa
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Diffstat (limited to 'src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderPreparationData.cpp')
0 files changed, 0 insertions, 0 deletions