Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.0
-
None
-
Android 4.3
-
Streamline paint event: fa83803119296c2224cf1c7fb7474057a77aa51b (dev, 29.1.2014, 5.3)
Description
QColorLuminancePicker::paintEvent() is slow. This probably would never be that noticeable except that I resized QColorLuminancePicker so it is more usable on Android, and it runs very slow.
When I looked at the code I noticed that there is code in the inner-most loop that should be in the loop one back... That should speed up the function quite a bit without rewriting the whole thing.
Currently:
for (y = 0; y < hi; y++) {
const uint *end = pixel + wi;
while (pixel < end)
}
Should be:
for (y = 0; y < hi; y++) {
const uint *end = pixel + wi;
QColor c;
c.setHsv(hue, sat, y2val(y+coff));
while (pixel < end)
}