[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 '6.12'. Changed from 38f0991c23b13e301e405d1944d000b0913108c4 to 91df9045a9f6f41b280d9b5cc00a1653f530a19b 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 c8e2b2f422e585a2501389277c3e2f2bbd4bdc5d by Qt Cherry-pick Bot (on behalf of Paul Olav Tvete) on 18/08/2026 at 12:22.. 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]> Change-Id: I0a2a10dcf73c6979242107e3566b3c2acd59aaaa Reviewed-by: Kaj Grönholm <[email protected]> (cherry picked from commit 9374f0f58c681a6812226bfef0027b46a68505a1) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtcanvaspainter/-/commit/c8e2b2f422e585a2501389277c3e2f2bbd4bdc5d Git commit 91df9045a9f6f41b280d9b5cc00a1653f530a19b by Qt Cherry-pick Bot (on behalf of Paul Olav Tvete) on 18/08/2026 at 12:22.. 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]> Change-Id: Id188e3be49163e65e09f6396dfccfcad7cc8a0e0 Reviewed-by: Kaj Grönholm <[email protected]> (cherry picked from commit b0f10ac17dd59eb81c78431e049cd46f4948472e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtcanvaspainter/-/commit/91df9045a9f6f41b280d9b5cc00a1653f530a19b