aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/qquickimageselector.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Imagine: enable caching for image lookupsv5.10.0-beta3J-P Nurmi2017-10-261-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File system lookups are somewhat expensive, so cache the results to avoid repetitive lookups. The default cache size of 500 is a rough estimate based on that the default assets have 300+ images per scale factor. Caching image lookups gives an average of 20% performance improvement in qmlbench: control before after improvement ---------------------------------------------- busyindicator 29 32 1.10344827586207 button 53 60 1.13207547169811 checkbox 51 60 1.17647058823529 combobox 39 44 1.12820512820513 dial 110 147 1.33636363636364 itemdelegate 54 61 1.12962962962963 label 143 152 1.06293706293706 menuitem 26 34 1.30769230769231 progressbar 13 15 1.15384615384615 radiobutton 52 59 1.13461538461538 scrollbar 37 62 1.67567567567568 scrollview 78 121 1.55128205128205 slider 31 40 1.29032258064516 spinbox 75 85 1.13333333333333 switch 35 43 1.22857142857143 textarea 80 88 1.1 textfield 56 63 1.125 tumbler 126 128 1.01587301587302 ---------------------------------------------- average 1.2102967624703 Caching can be disabled by setting an environment variable: QT_QUICK_CONTROLS_IMAGINE_CACHE=0 but this is not advertised in the docs for the time being. It is there to help debugging, should anything go wrong with caching. Change-Id: I1119f3d8186bc9a51cc174b06fed02ed9e1fb70c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Imagine: add support for file selectorsJ-P Nurmi2017-10-171-1/+2
| | | | | | | | | | | | | | For example: assets/ |__ button-background.9.png |__ +custom/ |__ button-background.9.png $ QT_FILE_SELECTORS=custom ./myapp Change-Id: I26f0b82885aa1a8e62fb4e3e58c7d8b19012406e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Imagine: add "qt.quick.controls.imagine" logging categoryJ-P Nurmi2017-10-171-0/+5
| | | | | | | | | | The output helps to debug image asset selection. For example: qt.quick.controls.imagine: "button-background" () -> "path/to/button-background.9.png" qt.quick.controls.imagine: "button-background" ("hovered") -> "path/to/button-background-hovered.9.png" Change-Id: I3aee85d357d9b9436341bfb06486e5b3089ce86f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickImageSelector: fix clazy-qvariant-template-instantiationJ-P Nurmi2017-10-101-2/+2
| | | | | Change-Id: I61f56c8806f02da2cab2ecf8452598431d921ca6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add Imagine styleJ-P Nurmi2017-07-311-0/+321
The Imagine style is based on image assets. The style comes with a default set of images, but the images can be easily changed by providing a directory with images using a predefined naming convention. [ChangeLog][Controls] Added the Imagine style, which is based on image assets that can be provided using a predefined naming convention. Task-number: QTPM-517 Change-Id: I550d7dac9a9686d60bec15655ac92dea9f36149c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>