[qt/qt/qtcanvaspainter]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/qt/qtcanvaspainter
Pushed by mirror-service into branch 'dev'.
Changed from 7db1b0062f3bf225551feab9d13359eefbb3b1b1 to b0f10ac17dd59eb81c78431e049cd46f4948472e
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit 9374f0f58c681a6812226bfef0027b46a68505a1 by Paul Olav Tvete on 18/08/2026 at 11:45..
Avoid redundant per-call FontKey hashing in QCDistanceFieldGlyphCache

Every fillText() call reconstructed a FontKey and hashed it against
m_glyphCaches up to 6 times (generate() plus getCurrentTextures()/
getOldTextures()/setOldTexture(), each re-deriving their own FontKey
from a second QRawFont::fromFont() call) even when the font was
unchanged from the previous call. Added fontKeyDataFor(), a fast path
keyed on the QFontEngine* pointer that skips the FontKey/hash entirely
in that case; generate()/generateFromShapedText() now return the
resolved FontKeyData* so callers reuse it instead of re-deriving one.

Safe because the fast path only fires when the font engine pointer
still matches the previous call; any mismatch falls back to the same
m_glyphCaches lookup as before, so returned textures/behavior are
unchanged. Confirmed via callgrind on an unchanging-font workload:
qHash(FontKey)'s share drops ~69%, total instructions ~10%.

Also remove unused rawFont member from struct FontKeyData.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Pick-to: 6.12
Change-Id: I0a2a10dcf73c6979242107e3566b3c2acd59aaaa
Reviewed-by: Kaj Grönholm <[email protected]>
https://invent.kde.org/qt/qt/qtcanvaspainter/-/commit/9374f0f58c681a6812226bfef0027b46a68505a1

Git commit b0f10ac17dd59eb81c78431e049cd46f4948472e by Paul Olav Tvete on 18/08/2026 at 11:45..
Avoid per-call QSet allocation/subtract in glyph reference tracking

populate() heap-allocated two fresh QSet<glyph_t> locals on every
call, then referenceGlyphs() did a real QSet::subtract() against
m_unusedGlyphs - all for what's typically a handful of glyph indices
per fillText()/fillShapedText() call. Neither local needs set
semantics: referencedGlyphs is only ever iterated once to remove()
each element (duplicates are a harmless no-op), and newGlyphs is
already deduplicated by the m_populatingGlyphs check in the same
loop. Switched both to QVarLengthArray<glyph_t, 16> and updated
requestGlyphs()/referenceGlyphs() to match - their bodies already
just iterated the argument, no set-specific behavior relied on.

m_populatingGlyphs/m_unusedGlyphs/m_referencedThisFrame/
m_referencedPrevFrame are unchanged; those need real membership
testing and a frame-boundary swap, which QSet still fits.

Confirmed via callgrind on a text-heavy fillShapedText() workload:
QSet<unsigned int>::subtract drops out of the profile entirely.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Pick-to: 6.12
Change-Id: Id188e3be49163e65e09f6396dfccfcad7cc8a0e0
Reviewed-by: Kaj Grönholm <[email protected]>
https://invent.kde.org/qt/qt/qtcanvaspainter/-/commit/b0f10ac17dd59eb81c78431e049cd46f4948472e
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.