qt5base-lts/util
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
..
accessibilityinspector Updated license headers 2016-01-21 18:55:18 +00:00
aglfn Updated license headers 2016-01-21 18:55:18 +00:00
corelib/qurl-generateTLDs Compile-fixes in the generator for qurltld_p.h 2019-10-25 11:43:04 +02:00
edid Minor grammar fixup 2018-08-03 18:11:24 +00:00
glgen Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
gradientgen WebGradients: redo implementation 2019-12-14 11:31:46 +01:00
harfbuzz
includemocs QtCore: include mocs 2017-05-05 03:03:30 +00:00
integrity
lexgen Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
locale_database Update CLDR to v36 2019-10-25 11:44:48 +02:00
plugintest Updated license headers 2016-01-21 18:55:18 +00:00
qfloat16-tables Merge remote-tracking branch 'origin/5.13' into 5.14 2019-11-06 11:41:19 +01:00
unicode Unicode tables: minor prettification 2019-11-28 11:04:39 +01:00
x86simdgen SIMD: Change the way we declare constants for x86 2018-07-09 00:18:30 +00:00
xkbdatagen Updated license headers 2016-01-21 18:55:18 +00:00