summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-10-07 20:36:05 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-10-13 10:51:26 +0000
commit2672a9a767909eab04ec6706bdef8a891a8f3d21 (patch)
tree0c9d6032b1733482f14e19c47c497c6dda6010b8 /src/widgets/doc/snippets/code
parentfedcaf0256f0094d77f171e4cdca2c4e2469e606 (diff)
QWidget: set brushOrigin in paintBackground() only when really needed
When painting the background for a QAbstractScrollArea, the brushOrigin was calculated for every brush type although it was not needed. Since this can be very time consuming (e.g for a QTreeView with non-uniform row sizes) it should be avoided when possible. Therefore check if the brush is a texture and skip the calculation if it is not the case. Also do not restore the old brushOrigin since the painter is not used at all afterwards. Task-number: QTBUG-61763 Change-Id: I66cbe1b796cb5cad4c78e656fb86d199d8e4bde9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions