summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-17 05:43:41 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-17 05:45:18 (GMT)
commitfac227f609e544f8f55aca8447b4328d6534407a (patch)
treeff8ffc0c6a2a6f47ad2f63589187c651523f51d7 /src/gui/painting
parentdc5543f5595870209e8122d13d070694b5e0eb39 (diff)
downloadQt-fac227f609e544f8f55aca8447b4328d6534407a.zip
Qt-fac227f609e544f8f55aca8447b4328d6534407a.tar.gz
Qt-fac227f609e544f8f55aca8447b4328d6534407a.tar.bz2
Speed up calls to QPainter::setCompositionMode when the mode is unchanged
Avoid marking the composition mode as dirty and calling into the extended engine if the composition mode that the application wants to set is the same that's currently used. Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index d17c711..71bc990 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2391,6 +2391,8 @@ void QPainter::setCompositionMode(CompositionMode mode)
qWarning("QPainter::setCompositionMode: Painter not active");
return;
}
+ if (d->state->composition_mode == mode)
+ return;
if (d->extended) {
d->state->composition_mode = mode;
d->extended->compositionModeChanged();