summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-21 19:19:36 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-21 19:19:36 (GMT)
commit07f131927faa09402589da7b4bfb516482f59e46 (patch)
tree9b1c7fdec802bbcb9b183d5644d02d8cc4435da2 /src/gui
parent19924c1373e6acdf4ebf8cf61c51f3cdf32978b3 (diff)
parentd00d1bd5423d0bbfea7c85a0411d2b22d97fbe0f (diff)
downloadQt-07f131927faa09402589da7b4bfb516482f59e46.zip
Qt-07f131927faa09402589da7b4bfb516482f59e46.tar.gz
Qt-07f131927faa09402589da7b4bfb516482f59e46.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Use aligned load for the blending of RGB32 over RGB32 tst_moc: workaround gcc bug. Some more change to the changelog Fix compilation with QT_NO_GRAPHICSVIEW Updates changes-4.7.0 Fixes the Oracle nchar bug when NLS_CHARSET is different with NLS_NCHAR_CHARSET. Add a missing file in the config.test for SSE 4.2 Remove the masking when computing qAlpha() Add support for more vector instructions on x86 Workaround gcc bug, disable test with old version of gcc Do not crash due to a infinite recursion when using voiceover on MacOS doc: Fix qdoc errors for text related files QGraphicsItem: Animation leaves drawing artifacts when clipping is used. moc: Slot with complex template default value does not compile
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
-rw-r--r--src/gui/gui.pro5
-rw-r--r--src/gui/kernel/qstandardgestures.cpp8
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp14
-rw-r--r--src/gui/painting/qrgb.h2
-rw-r--r--src/gui/text/qstatictext.cpp4
-rw-r--r--src/gui/text/qtextobject.cpp2
7 files changed, 34 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4bc7f4c..48a0093 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5178,7 +5178,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
// Process children.
if (itemHasChildren && item->d_ptr->dirtyChildren) {
const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
- if (itemClipsChildrenToShape) {
+ // Items with no content are threated as 'dummy' items which means they are never drawn and
+ // 'processed', so the painted view bounding rect is never up-to-date. This means that whenever
+ // such an item changes geometry, its children have to take care of the update regardless
+ // of whether the item clips children to shape or not.
+ const bool bypassUpdateClip = !itemHasContents && wasDirtyParentViewBoundingRects;
+ if (itemClipsChildrenToShape && !bypassUpdateClip) {
// Make sure child updates are clipped to the item's bounding rect.
for (int i = 0; i < views.size(); ++i)
views.at(i)->d_func()->setUpdateClip(item);
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 41f1904..3aee078 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -84,6 +84,11 @@ contains(QMAKE_MAC_XARCH, no) {
3dnow:DEFINES += QT_HAVE_3DNOW
sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
sse2:DEFINES += QT_HAVE_SSE2
+ sse3:DEFINES += QT_HAVE_SSE3
+ ssse3:DEFINES += QT_HAVE_SSSE3
+ sse4_1:DEFINES += QT_HAVE_SSE4_1
+ sse4_2:DEFINES += QT_HAVE_SSE4_2
+ avx:DEFINES += QT_HAVE_AVX
iwmmxt:DEFINES += QT_HAVE_IWMMXT
win32-g++*|!win32:!*-icc* {
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index e05f8cc..127e150 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -515,11 +515,14 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
+#ifndef QT_NO_GRAPHICSVIEW
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
+#endif
enum { TapRadius = 40 };
switch (event->type()) {
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMousePress:
d->position = gsme->screenPos();
q->setHotSpot(d->position);
@@ -527,6 +530,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
q->killTimer(d->timerId);
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#endif
case QEvent::MouseButtonPress:
d->position = me->globalPos();
q->setHotSpot(d->position);
@@ -541,7 +545,9 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
q->killTimer(d->timerId);
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseRelease:
+#endif
case QEvent::MouseButtonRelease:
case QEvent::TouchEnd:
return QGestureRecognizer::CancelGesture; // get out of the MayBeGesture state
@@ -559,12 +565,14 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseMove: {
QPoint delta = gsme->screenPos() - d->position.toPoint();
if (d->timerId && delta.manhattanLength() <= TapRadius)
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#endif
default:
return QGestureRecognizer::Ignore;
}
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 346e177..279f685 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -110,13 +110,23 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
for (int y = 0; y < h; ++y) {
int x = 0;
+
+ // First, align dest to 16 bytes:
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(w, offsetToAlignOn16Bytes);
+ for (; x < prologLength; ++x) {
+ quint32 s = src[x];
+ s = BYTE_MUL(s, const_alpha);
+ dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
+ }
+
for (; x < w-3; x += 4) {
__m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) {
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
__m128i result;
INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half);
- _mm_storeu_si128((__m128i *)&dst[x], result);
+ _mm_store_si128((__m128i *)&dst[x], result);
}
}
for (; x<w; ++x) {
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index 8e635a8..ea5f353 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -64,7 +64,7 @@ Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB
{ return (rgb & 0xff); }
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA
-{ return ((rgb >> 24) & 0xff); }
+{ return rgb >> 24; }
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value
{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index ab518d0..f6daed8 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -148,9 +148,7 @@ QStaticText::QStaticText()
}
/*!
- Constructs a QStaticText object with the given \a text and bounded by the given \a size.
-
- If an invalid size is passed for \a size the text will be unbounded.
+ Constructs a QStaticText object with the given \a text.
*/
QStaticText::QStaticText(const QString &text)
: data(new QStaticTextPrivate)
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index f386871..5fb3384 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1148,7 +1148,7 @@ int QTextBlock::charFormatIndex() const
direction from the blocks content. Returns either Qt::LeftToRight
or Qt::RightToLeft.
- \sa QTextBlock::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
+ \sa QTextFormat::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
*/
Qt::LayoutDirection QTextBlock::textDirection() const
{