diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-17 05:43:41 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-17 05:45:18 (GMT) |
commit | fac227f609e544f8f55aca8447b4328d6534407a (patch) | |
tree | ff8ffc0c6a2a6f47ad2f63589187c651523f51d7 /src/gui/painting | |
parent | dc5543f5595870209e8122d13d070694b5e0eb39 (diff) | |
download | Qt-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.cpp | 2 |
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(); |