diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-01-10 15:48:14 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-01-14 06:27:52 +0000 |
commit | 3b0cd132225504f36bc355f239cde95a9bac0985 (patch) | |
tree | 5c492c0f9435912594b46367ae2c37553912d13a /src/network/access/qnetworkaccessmanager.h | |
parent | 01cade50509de392f06e6f5ee939421a576e06c1 (diff) |
QGradient: add a setStops fast-path for conformant QGradientStops
The setStops() docs state that the stops need to be sorted and the positions
must be valid. But the implementation sorts the stops and filters out invalid
ones, so we probably need to keep that behavior, which, however, causes memory
allocations and, potentially, O(N²) behavior, because setColorAt() uses a
form of Insertion Sort with linear scanning...
Add a fast-path for the common case that users adhere to the docs and pass
valid stops.
Change-Id: I93099a57bc4f37d1240a9e9f763618fd5095bc64
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.h')
0 files changed, 0 insertions, 0 deletions