diff options
author | Andy Shaw <andy.shaw@digia.com> | 2014-02-18 13:29:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-20 08:13:57 +0100 |
commit | 72fbcc8bbf7bfae962ee9c3d3bccfc8253709bd4 (patch) | |
tree | b87e417e5d0d353d210b806a9415cd3e17d06a15 /src/gui/painting/qpainter.cpp | |
parent | 170df5addb5334befc8c61130c748fb77de46600 (diff) |
Ensure we switch back to the real paint engine when not emulating
When the emulation paint engine was no longer needed then it would still
end up using it because the flags would prevent it from being switched
back. This ensures that it has the right engine when something triggers
it to be switched.
Change-Id: I7571923d16cbebd9fdd34560631b561c07a724f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1fc044aa44..e35cdd370e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -171,9 +171,6 @@ static bool qt_painter_thread_test(int devType, const char *what) void QPainterPrivate::checkEmulation() { Q_ASSERT(extended); - if (extended->flags() & QPaintEngineEx::DoNotEmulate) - return; - bool doEmulation = false; if (state->bgMode == Qt::OpaqueMode) doEmulation = true; @@ -186,6 +183,9 @@ void QPainterPrivate::checkEmulation() if (pg && pg->coordinateMode() > QGradient::LogicalMode) doEmulation = true; + if (doEmulation && extended->flags() & QPaintEngineEx::DoNotEmulate) + return; + if (doEmulation) { if (extended != emulationEngine) { if (!emulationEngine) |