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>
This commit is contained in:
parent
170df5addb
commit
72fbcc8bbf
@ -171,9 +171,6 @@ static bool qt_painter_thread_test(int devType, const char *what)
|
|||||||
void QPainterPrivate::checkEmulation()
|
void QPainterPrivate::checkEmulation()
|
||||||
{
|
{
|
||||||
Q_ASSERT(extended);
|
Q_ASSERT(extended);
|
||||||
if (extended->flags() & QPaintEngineEx::DoNotEmulate)
|
|
||||||
return;
|
|
||||||
|
|
||||||
bool doEmulation = false;
|
bool doEmulation = false;
|
||||||
if (state->bgMode == Qt::OpaqueMode)
|
if (state->bgMode == Qt::OpaqueMode)
|
||||||
doEmulation = true;
|
doEmulation = true;
|
||||||
@ -186,6 +183,9 @@ void QPainterPrivate::checkEmulation()
|
|||||||
if (pg && pg->coordinateMode() > QGradient::LogicalMode)
|
if (pg && pg->coordinateMode() > QGradient::LogicalMode)
|
||||||
doEmulation = true;
|
doEmulation = true;
|
||||||
|
|
||||||
|
if (doEmulation && extended->flags() & QPaintEngineEx::DoNotEmulate)
|
||||||
|
return;
|
||||||
|
|
||||||
if (doEmulation) {
|
if (doEmulation) {
|
||||||
if (extended != emulationEngine) {
|
if (extended != emulationEngine) {
|
||||||
if (!emulationEngine)
|
if (!emulationEngine)
|
||||||
|
Loading…
Reference in New Issue
Block a user