qt6-bb10/tests/auto
Giuseppe D'Angelo 5b4b437b30 WebGradients: redo implementation
The previous implementation was *extremely* expensive. It
relied on loading a binary JSON file from resources (which
involved decompressing it), then extracting information out of
it to build a gradient.  Already-loaded gradients were kept in
a local cache, which had to be mutex protected.

Instead, this patch extends the gradient generator to build
static arrays filled with the web gradient data, sitting in
.rodata.

These arrays are used when building QGradient objects with a
web gradient. No explicit mutex protection is necessary, since
accesses will just read from the arrays.

As benefits, this patch removes:

* the binary json representation from QtGui's resources (~4KB
compressed, ~50KB uncompressed)
* the overhead of reading from the JSON for each used web
gradient;
* the startup costs of registering the webgradients in the
resources;
* all the overhead of mutex locking when building such
gradients;
* all the runtime memory allocations to load, parse and cache
the web gradients (including the memory + CPU spike on first
load due to the uncompression of the JSON data, as well as a
couple of deep copies).

Change-Id: If5c3d704430df76ce8faf55ee75ebd4639ba09c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-12-14 11:31:46 +01:00
..
bic/data Add binary compatibility files for Qt5.13.0 for QtBase 2019-08-15 04:19:39 +00:00
cmake CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib Add QMap::insert(const QMap &map) 2019-12-12 15:25:30 +01:00
dbus Deprecate constructing QFlags from a pointer 2019-11-20 19:43:38 +01:00
gui WebGradients: redo implementation 2019-12-14 11:31:46 +01:00
guiapplauncher
installed_cmake
network Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
opengl Remove dead code from Qt 4 times 2019-08-20 22:27:46 +00:00
other Session management for macOS 2019-12-02 18:18:22 +01:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
testlib Deprecate constructing QFlags from a pointer 2019-11-20 19:43:38 +01:00
tools Support Q_GADGET QMetaObject super class hierarchies across templates 2019-12-12 13:02:52 +01:00
widgets Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-12-10 17:53:06 +02:00
xml Port QDomDocument to QXmlStreamReader 2019-11-26 09:07:26 +01:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00