From e9a314d6734972254f52b64da77d4c5d8762517a Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Fri, 2 Jul 2010 14:37:18 +0200 Subject: Don't do alpha/opaque check which might cause a conversion and later pointer not-matching. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 724 Reviewed-by: Samuel Rødal --- src/gui/painting/qgraphicssystem_runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 1c3ae10..3438137 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -418,7 +418,7 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) QRuntimePixmapData *proxy = m_pixmapDatas.at(i); QPixmapData *newData = m_graphicsSystem->createPixmapData(proxy->m_data); // ### TODO Optimize. Openvg and s60raster graphics systems could switch internal ARGB32_PRE QImage buffers. - newData->fromImage(proxy->m_data->toImage(), Qt::AutoColor | Qt::OrderedAlphaDither); + newData->fromImage(proxy->m_data->toImage(), Qt::NoOpaqueDetection); delete proxy->m_data; proxy->m_data = newData; proxy->readBackInfo(); -- cgit v0.12 From 6a405778ca053d05d32ea8e0949bee917c0316e2 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 2 Jul 2010 14:38:33 +0200 Subject: Crash when dragging with mingw The problem was that there was a misalignment coming from the d&d code. That called in the end our SSE optimized functions. This code turns out to be calling QApplication::processEvents which in the the calls the Qt event dispatcher for windows' processEvents function. This function will now also always align the stack to 16 bytes and be SSE ready. Task-number: QTBUG-11880 Reviewed-by: Zeno Albisser --- src/corelib/global/qglobal.h | 5 +++-- src/corelib/kernel/qeventdispatcher_win_p.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 76f35ac..8a3166d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1066,10 +1066,11 @@ redefine to built-in booleans to make autotests work properly */ //the alignment needs to be forced for sse2 to not crash with mingw #if defined(Q_WS_WIN) # if defined(Q_CC_MINGW) -# define QT_WIN_CALLBACK CALLBACK __attribute__ ((force_align_arg_pointer)) +# define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer)) # else -# define QT_WIN_CALLBACK CALLBACK +# define QT_ENSURE_STACK_ALIGNED_FOR_SSE # endif +# define QT_WIN_CALLBACK CALLBACK QT_ENSURE_STACK_ALIGNED_FOR_SSE #endif typedef int QNoImplicitBoolCast; diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h index 788cc44..b219841 100644 --- a/src/corelib/kernel/qeventdispatcher_win_p.h +++ b/src/corelib/kernel/qeventdispatcher_win_p.h @@ -76,7 +76,7 @@ public: explicit QEventDispatcherWin32(QObject *parent = 0); ~QEventDispatcherWin32(); - bool processEvents(QEventLoop::ProcessEventsFlags flags); + bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags); bool hasPendingEvents(); void registerSocketNotifier(QSocketNotifier *notifier); -- cgit v0.12