So far we have only cached the most recently requested pixmap, under the assumption that this is the one usually requested several times in a row. However, our menu integration requests the pixmaps for all available sizes when populating the native menu item with an NSImage. Not caching the pixmaps for all sizes results in repeated rendering of the image, which significantly slows down the opening of native menus e.g. using Qt Quick's labs.platform Menu. Use a per-icon-engine cache for the pixmaps, with a cache key that is a struct holding the mode, state, size, and scale factor. Pick-to: 6.7 Fixes: QTBUG-127614 Change-Id: Ie13cae8c69a8ee979907d4b9ea01bcdd89dd585b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit c8a2794c441dfc6aa0ceec3ae847a8b1e353a89f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%