[SCM] Qt 4 packaging branch, master, updated. debian/4.7.2-4-17-g661bb80
Fathi Boudra
fabo at alioth.debian.org
Sun May 8 15:56:16 UTC 2011
The following commit has been merged in the master branch:
commit daa02fe46fcd932d36c7009fa1aae5b2eb2d393e
Author: Fathi Boudra <fabo at debian.org>
Date: Sun May 8 18:39:48 2011 +0300
Add patches cherry-picked upstream
---
debian/changelog | 16 +++-
..._support_for_QT_USE_DRAG_DISTANCE_env_var.patch | 18 +++
.../Fix_GL_problems_on_stock_1.4_SGX_drivers.patch | 68 ++++++++++++
.../Fix_transformIsSimple_in_QGraphicsScene.patch | 39 +++++++
...en_using_static_text_items_in_GL_2_engine.patch | 110 ++++++++++++++++++++
...formance-of-partial-updates-in-raster-win.patch | 110 ++++++++++++++++++++
.../patches/Make_use_of_the_fast_image_paths.patch | 73 +++++++++++++
.../patches/Micro-optimization_for_QSpanData.patch | 22 ++++
...nt_recursion_when_creating_window_surface.patch | 37 +++++++
.../Some_Optimizations_for_the_gray_raster.patch | 99 ++++++++++++++++++
.../Update_createwindow_in_qgl_x11egl.patch | 38 +++++++
debian/patches/series | 10 ++
12 files changed, 637 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 5deea30..25f1c77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,18 @@
qt4-x11 (4:4.7.3-1) UNRELEASED; urgency=low
* New upstream release.
- * Remove patches:
- - blacklist_fraudulent_comodo_certificates.diff - stolen upstream
+ * Remove blacklist_fraudulent_comodo_certificates.diff - stolen upstream.
+ * Add patches cherry-picked upstream:
+ - Fix_GL_problems_on_stock_1.4_SGX_drivers.patch
+ - Fixed_missing_text_when_using_static_text_items_in_GL_2_engine.patch
+ - Update_createwindow_in_qgl_x11egl.patch
+ - Improve-performance-of-partial-updates-in-raster-win.patch
+ - Fix_transformIsSimple_in_QGraphicsScene.patch
+ - Micro-optimization_for_QSpanData.patch
+ - Some_Optimizations_for_the_gray_raster.patch
+ - Make_use_of_the_fast_image_paths.patch
+ - Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
+ - Prevent_recursion_when_creating_window_surface.patch
[ Pino Toscano ]
* Build depend on libssl-dev. (Closes: #623596)
@@ -21,7 +31,7 @@ qt4-x11 (4:4.7.3-1) UNRELEASED; urgency=low
* Build designer library with -gstabs on powerpc to avoid gcc 4.6 dwarf2 ICE,
which makes the package FTBFS (patch powerpc_designer_gstabs.diff).
- -- Fathi Boudra <fabo at debian.org> Wed, 04 May 2011 13:08:38 +0300
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Wed, 04 May 2011 13:08:38 +0300
qt4-x11 (4:4.7.2-4) unstable; urgency=low
diff --git a/debian/patches/Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch b/debian/patches/Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
new file mode 100644
index 0000000..03ef0ee
--- /dev/null
+++ b/debian/patches/Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
@@ -0,0 +1,18 @@
+Description: support reading of default value for startDragDistance property
+from QT_USE_DRAG_DISTANCE environment variable.
+See also http://bugreports.qt.nokia.com/browse/QTBUG-12594
+Author: Joonas Tanskanen <joonas.tanskanen at sasken.com>
+--- a/src/gui/kernel/qapplication.cpp
++++ b/src/gui/kernel/qapplication.cpp
+@@ -1013,6 +1013,11 @@ void QApplicationPrivate::initialize()
+ QApplicationPrivate::wheel_scroll_lines = 3;
+ #endif
+
++ if(qgetenv("QT_USE_DRAG_DISTANCE").toInt() > 0) {
++ int dragThreshold = qgetenv("QT_USE_DRAG_DISTANCE").toInt();
++ q->setStartDragDistance(dragThreshold);
++ }
++
+ if (qt_is_gui_used)
+ initializeMultitouch();
+ }
diff --git a/debian/patches/Fix_GL_problems_on_stock_1.4_SGX_drivers.patch b/debian/patches/Fix_GL_problems_on_stock_1.4_SGX_drivers.patch
new file mode 100644
index 0000000..749848e
--- /dev/null
+++ b/debian/patches/Fix_GL_problems_on_stock_1.4_SGX_drivers.patch
@@ -0,0 +1,68 @@
+commit 3fb5fce61b6f64534ad292a78250e4256a6514b6
+Author: Robin Burchell <robin.burchell at collabora.co.uk>
+Date: Thu Mar 17 18:32:58 2011 +0100
+
+ Changes to driver workarounds.
+
+ - Force enable brokenFBOReadBack on non-Nokia v1.4 SGX drivers (as this is
+ apparantly not fixed, except on the Nokia drivers)
+ - Add debug when workarounds are enabled to ease debugging
+
+ This fixes the following MeeGo bug:
+ https://bugs.meego.com/show_bug.cgi?id=5616
+
+ Merge-request: 1144
+ Reviewed-by: Samuel Rødal <samuel.rodal at nokia.com>
+
+--- a/src/opengl/qgl_egl.cpp
++++ b/src/opengl/qgl_egl.cpp
+@@ -39,6 +39,7 @@
+ **
+ ****************************************************************************/
+
++#include <QtCore/qdebug.h>
+ #include <QtOpenGL/qgl.h>
+ #include <QtOpenGL/qglpixelbuffer.h>
+ #include "qgl_p.h"
+@@ -195,6 +196,7 @@ void QGLContext::makeCurrent()
+ // PowerVR MBX/SGX chips needs to clear all buffers when starting to render
+ // a new frame, otherwise there will be a performance penalty to pay for
+ // each frame.
++ qDebug() << "Found SGX/MBX driver, enabling FullClearOnEveryFrame";
+ d->workaround_needsFullClearOnEveryFrame = true;
+
+ // Older PowerVR SGX drivers (like the one in the N900) have a
+@@ -202,10 +204,31 @@ void QGLContext::makeCurrent()
+ // or GL_ALPHA texture bound to an FBO. The only way to
+ // identify that driver is to check the EGL version number for it.
+ const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
+- if (egl_version && strstr(egl_version, "1.3"))
++
++ if (egl_version && strstr(egl_version, "1.3")) {
++ qDebug() << "Found v1.3 driver, enabling brokenFBOReadBack";
+ d->workaround_brokenFBOReadBack = true;
+- else if (egl_version && strstr(egl_version, "1.4"))
++ } else if (egl_version && strstr(egl_version, "1.4")) {
++ qDebug() << "Found v1.4 driver, enabling brokenTexSubImage";
+ d->workaround_brokenTexSubImage = true;
++
++ // this is a bit complicated; 1.4 version SGX drivers from
++ // Nokia have fixed the brokenFBOReadBack problem, but
++ // official drivers from TI haven't, meaning that things
++ // like the beagleboard are broken unless we hack around it
++ // - but at the same time, we want to not reduce performance
++ // by not enabling this elsewhere.
++ //
++ // so, let's check for a Nokia-specific addon, and only
++ // enable if it isn't present.
++ // (see MeeGo bug #5616)
++ if (!QEgl::hasExtension("EGL_NOK_image_shared")) {
++ // no Nokia extension, this is probably a standard SGX
++ // driver, so enable the workaround
++ qDebug() << "Found non-Nokia v1.4 driver, enabling brokenFBOReadBack";
++ d->workaround_brokenFBOReadBack = true;
++ }
++ }
+ }
+ }
+ }
diff --git a/debian/patches/Fix_transformIsSimple_in_QGraphicsScene.patch b/debian/patches/Fix_transformIsSimple_in_QGraphicsScene.patch
new file mode 100644
index 0000000..b7ec9ed
--- /dev/null
+++ b/debian/patches/Fix_transformIsSimple_in_QGraphicsScene.patch
@@ -0,0 +1,39 @@
+commit 6901d3a9ff05a6fbf13ef7f38a36ad21d20f6a49
+Author: Jørgen Lind <jorgen.lind at nokia.com>
+Date: Tue Nov 16 12:45:15 2010 +0100
+
+ Fix transformIsSimple in QGraphicsScene
+
+ The transformIsSimple was a bit to restrictive
+
+ Reviewed-by: bnilsen
+
+--- a/src/gui/graphicsview/qgraphicsscene.cpp
++++ b/src/gui/graphicsview/qgraphicsscene.cpp
+@@ -4367,25 +4367,8 @@ static void _q_paintIntoCache(QPixmap *p
+ static inline bool transformIsSimple(const QTransform& transform)
+ {
+ QTransform::TransformationType type = transform.type();
+- if (type == QTransform::TxNone || type == QTransform::TxTranslate) {
++ if (type <= QTransform::TxScale) {
+ return true;
+- } else if (type == QTransform::TxScale) {
+- // Check for 0 and 180 degree rotations.
+- // (0 might happen after 4 rotations of 90 degrees).
+- qreal m11 = transform.m11();
+- qreal m12 = transform.m12();
+- qreal m21 = transform.m21();
+- qreal m22 = transform.m22();
+- if (m12 == 0.0f && m21 == 0.0f) {
+- if (m11 == 1.0f && m22 == 1.0f)
+- return true; // 0 degrees
+- else if (m11 == -1.0f && m22 == -1.0f)
+- return true; // 180 degrees.
+- if(m11 == 1.0f && m22 == -1.0f)
+- return true; // 0 degrees inverted y.
+- else if(m11 == -1.0f && m22 == 1.0f)
+- return true; // 180 degrees inverted y.
+- }
+ } else if (type == QTransform::TxRotate) {
+ // Check for 90, and 270 degree rotations.
+ qreal m11 = transform.m11();
diff --git a/debian/patches/Fixed_missing_text_when_using_static_text_items_in_GL_2_engine.patch b/debian/patches/Fixed_missing_text_when_using_static_text_items_in_GL_2_engine.patch
new file mode 100644
index 0000000..209964b
--- /dev/null
+++ b/debian/patches/Fixed_missing_text_when_using_static_text_items_in_GL_2_engine.patch
@@ -0,0 +1,110 @@
+commit 4d38013cfc3058e36de1b6a6c20653ef2688a92b
+Author: Samuel Rødal <samuel.rodal at nokia.com>
+Date: Tue Feb 1 17:57:10 2011 +0100
+
+ Fixed missing text when using static text items in GL 2 engine.
+
+ When the context is destroyed and recreated, we end up with a new glyph
+ cache, but we only recreate the vertex arrays for the very first static
+ text item. We need to keep track of the glyph cache in each text item,
+ so that we can recreate the vertex arrays and re-populate the cache
+ accordingly. As the pointer might be the same after the glyph cache is
+ recreated, we need to use serial numbers instead.
+
+ We also need to re-create the cache when the context pointer has been
+ invalidated, so that the static text items also get invalidated, and
+ the texture glyph cache gets repopulated.
+
+ Reviewed-by: Eskil Abrahamsen Blomfeldt
+
+--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+@@ -1489,7 +1489,7 @@ namespace {
+ {
+ public:
+ QOpenGLStaticTextUserData()
+- : QStaticTextUserData(OpenGLUserData), cacheSize(0, 0)
++ : QStaticTextUserData(OpenGLUserData), cacheSize(0, 0), cacheSerialNumber(0)
+ {
+ }
+
+@@ -1501,6 +1501,7 @@ namespace {
+ QGL2PEXVertexArray vertexCoordinateArray;
+ QGL2PEXVertexArray textureCoordinateArray;
+ QFontEngineGlyphCache::Type glyphType;
++ int cacheSerialNumber;
+ };
+
+ }
+@@ -1518,12 +1519,10 @@ void QGL2PaintEngineExPrivate::drawCache
+
+ QGLTextureGlyphCache *cache =
+ (QGLTextureGlyphCache *) staticTextItem->fontEngine()->glyphCache(ctx, glyphType, QTransform());
+- if (!cache || cache->cacheType() != glyphType) {
++ if (!cache || cache->cacheType() != glyphType || cache->context() == 0) {
+ cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform());
+ staticTextItem->fontEngine()->setGlyphCache(ctx, cache);
+ recreateVertexArrays = true;
+- } else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value
+- cache->setContext(ctx);
+ }
+
+ if (staticTextItem->userDataNeedsUpdate) {
+@@ -1534,8 +1533,11 @@ void QGL2PaintEngineExPrivate::drawCache
+ recreateVertexArrays = true;
+ } else {
+ QOpenGLStaticTextUserData *userData = static_cast<QOpenGLStaticTextUserData *>(staticTextItem->userData());
+- if (userData->glyphType != glyphType)
++ if (userData->glyphType != glyphType) {
+ recreateVertexArrays = true;
++ } else if (userData->cacheSerialNumber != cache->serialNumber()) {
++ recreateVertexArrays = true;
++ }
+ }
+
+ // We only need to update the cache with new glyphs if we are actually going to recreate the vertex arrays.
+@@ -1580,6 +1582,7 @@ void QGL2PaintEngineExPrivate::drawCache
+ }
+
+ userData->glyphType = glyphType;
++ userData->cacheSerialNumber = cache->serialNumber();
+
+ // Use cache if backend optimizations is turned on
+ vertexCoordinates = &userData->vertexCoordinateArray;
+--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
++++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+@@ -52,12 +52,15 @@ QT_BEGIN_NAMESPACE
+ extern Q_GUI_EXPORT bool qt_cleartype_enabled;
+ #endif
+
++QBasicAtomicInt qgltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
++
+ QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix)
+ : QImageTextureGlyphCache(type, matrix)
+ , ctx(0)
+ , m_width(0)
+ , m_height(0)
+ , m_filterMode(Nearest)
++ , m_serialNumber(qgltextureglyphcache_serial_number.fetchAndAddRelaxed(1))
+ {
+ setContext(context);
+ }
+--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
++++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+@@ -83,6 +83,8 @@ public:
+
+ inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
+
++ inline int serialNumber() const { return m_serialNumber; }
++
+ enum FilterMode {
+ Nearest,
+ Linear
+@@ -140,6 +142,7 @@ private:
+ QGLShaderProgram *m_program;
+
+ FilterMode m_filterMode;
++ int m_serialNumber;
+ };
+
+ QT_END_NAMESPACE
diff --git a/debian/patches/Improve-performance-of-partial-updates-in-raster-win.patch b/debian/patches/Improve-performance-of-partial-updates-in-raster-win.patch
new file mode 100644
index 0000000..4d28954
--- /dev/null
+++ b/debian/patches/Improve-performance-of-partial-updates-in-raster-win.patch
@@ -0,0 +1,110 @@
+From 30dee4f433d2426ce2dc0bccda8e62683380a1c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Samuel=20R=C3=B8dal?= <samuel.rodal at nokia.com>
+Date: Thu, 3 Feb 2011 17:06:15 +0100
+Subject: [PATCH] Improve performance of partial updates in raster window surface on X11.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+An XSync is needed to prevent the raster engine from writing to the
+shared memory raster backbuffer at the same time the X server reads from
+it. However, instead of doing the sync right after telling X to blit, we
+can do it right before we start writing to it with raster. At this point
+there will on average be less processing heavy X commands in the command
+queue, and we thus spend less time blocking the GUI thread.
+
+Measured frame rate improvement of 20 - 60 % in an update stress testing
+the performance of partial updates.
+
+Idea-from: Olivier Goffart
+Reviewed-by: Bjørn Erik Nilsen
+---
+ src/gui/painting/qwindowsurface_raster.cpp | 29 ++++++++++++++++++++++++++-
+ src/gui/painting/qwindowsurface_raster_p.h | 3 ++
+ 2 files changed, 30 insertions(+), 2 deletions(-)
+
+--- a/src/gui/painting/qwindowsurface_raster.cpp
++++ b/src/gui/painting/qwindowsurface_raster.cpp
+@@ -75,6 +75,9 @@ public:
+
+ #ifdef Q_WS_X11
+ GC gc;
++#ifndef QT_NO_MITSHM
++ uint needsSync : 1;
++#endif
+ #ifndef QT_NO_XRENDER
+ uint translucentBackground : 1;
+ #endif
+@@ -91,6 +94,9 @@ QRasterWindowSurface::QRasterWindowSurfa
+ d_ptr->translucentBackground = X11->use_xrender
+ && window->x11Info().depth() == 32;
+ #endif
++#ifndef QT_NO_MITHSM
++ d_ptr->needsSync = false;
++#endif
+ #endif
+ d_ptr->image = 0;
+ d_ptr->inSetGeometry = false;
+@@ -113,8 +119,23 @@ QPaintDevice *QRasterWindowSurface::pain
+ return &d_ptr->image->image;
+ }
+
++#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
++void QRasterWindowSurface::syncX()
++{
++ // delay writing to the backbuffer until we know for sure X is done reading from it
++ if (d_ptr->needsSync) {
++ XSync(X11->display, false);
++ d_ptr->needsSync = false;
++ }
++}
++#endif
++
+ void QRasterWindowSurface::beginPaint(const QRegion &rgn)
+ {
++#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
++ syncX();
++#endif
++
+ #if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_WS_WINCE))
+ if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) {
+ #if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
+@@ -214,13 +235,13 @@ void QRasterWindowSurface::flush(QWidget
+ if (d_ptr->image->xshmpm) {
+ XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc,
+ br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y());
+- XSync(X11->display, False);
++ d_ptr->needsSync = true;
+ } else if (d_ptr->image->xshmimg) {
+ const QImage &src = d->image->image;
+ br = br.intersected(src.rect());
+ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg,
+ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False);
+- XSync(X11->display, False);
++ d_ptr->needsSync = true;
+ } else
+ #endif
+ {
+@@ -347,6 +368,10 @@ bool QRasterWindowSurface::scroll(const
+ if (!d->image || d->image->image.isNull())
+ return false;
+
++#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
++ syncX();
++#endif
++
+ const QVector<QRect> rects = area.rects();
+ for (int i = 0; i < rects.size(); ++i)
+ qt_scrollRectInImage(d->image->image, rects.at(i), QPoint(dx, dy));
+--- a/src/gui/painting/qwindowsurface_raster_p.h
++++ b/src/gui/painting/qwindowsurface_raster_p.h
+@@ -107,6 +107,9 @@ public:
+ bool scroll(const QRegion &area, int dx, int dy);
+
+ private:
++#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
++ void syncX();
++#endif
+ void prepareBuffer(QImage::Format format, QWidget *widget);
+ Q_DECLARE_PRIVATE(QRasterWindowSurface)
+ QScopedPointer<QRasterWindowSurfacePrivate> d_ptr;
diff --git a/debian/patches/Make_use_of_the_fast_image_paths.patch b/debian/patches/Make_use_of_the_fast_image_paths.patch
new file mode 100644
index 0000000..c96ca69
--- /dev/null
+++ b/debian/patches/Make_use_of_the_fast_image_paths.patch
@@ -0,0 +1,73 @@
+commit 60da9087f137f59d6b34e3b5c12f7c266de2d1f0
+Author: Samuel Rødal <samuel.rodal at nokia.com>
+Date: Mon Nov 1 12:49:41 2010 +0100
+
+ Make use of the fast image paths for CompositionMode_Source as well.
+
+ Blending / blitting of images without an alpha-channel gives the same
+ result with CompositionMode_Source and CompositionMode_SourceOver.
+
+ Task-number: QTBUG-14901
+ Reviewed-by: Kim
+
+--- a/src/gui/painting/qpaintengine_raster.cpp
++++ b/src/gui/painting/qpaintengine_raster.cpp
+@@ -2506,7 +2506,7 @@ void QRasterPaintEngine::drawImage(const
+ const QClipData *clip = d->clip();
+ QPointF pt(p.x() + s->matrix.dx(), p.y() + s->matrix.dy());
+
+- if (s->flags.fast_images) {
++ if (d->canUseFastImageBlending(d->rasterBuffer->compositionMode, img)) {
+ SrcOverBlendFunc func = qBlendFunctions[d->rasterBuffer->format][img.format()];
+ if (func) {
+ if (!clip) {
+@@ -2690,7 +2690,7 @@ void QRasterPaintEngine::drawImage(const
+ bool exceedsPrecision = targetBounds.width() > 0xffff
+ || targetBounds.height() > 0xffff;
+
+- if (s->flags.fast_images && !exceedsPrecision) {
++ if (!exceedsPrecision && d->canUseFastImageBlending(d->rasterBuffer->compositionMode, img)) {
+ if (s->matrix.type() > QTransform::TxScale) {
+ SrcOverTransformFunc func = qTransformFunctions[d->rasterBuffer->format][img.format()];
+ if (func && (!clip || clip->hasRectClip)) {
+@@ -2765,8 +2765,7 @@ void QRasterPaintEngine::drawImage(const
+ fillPath(path, &d->image_filler_xform);
+ s->matrix = m;
+ } else {
+-
+- if (s->flags.fast_images) {
++ if (d->canUseFastImageBlending(d->rasterBuffer->compositionMode, img)) {
+ SrcOverBlendFunc func = qBlendFunctions[d->rasterBuffer->format][img.format()];
+ if (func) {
+ QPointF pt(r.x() + s->matrix.dx(), r.y() + s->matrix.dy());
+@@ -4289,11 +4288,19 @@ void QRasterPaintEnginePrivate::recalcul
+ QRasterPaintEngineState *s = q->state();
+
+ s->flags.fast_images = !(s->renderHints & QPainter::SmoothPixmapTransform)
+- && rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver
+ && s->matrix.type() <= QTransform::TxShear;
+ }
+
++bool QRasterPaintEnginePrivate::canUseFastImageBlending(QPainter::CompositionMode mode, const QImage &image) const
++{
++ Q_Q(const QRasterPaintEngine);
++ const QRasterPaintEngineState *s = q->state();
+
++ return s->flags.fast_images
++ && (mode == QPainter::CompositionMode_SourceOver
++ || (mode == QPainter::CompositionMode_Source
++ && !image.hasAlphaChannel()));
++}
+
+ QImage QRasterBuffer::colorizeBitmap(const QImage &image, const QColor &color)
+ {
+--- a/src/gui/painting/qpaintengine_raster_p.h
++++ b/src/gui/painting/qpaintengine_raster_p.h
+@@ -340,6 +340,7 @@ public:
+ void initializeRasterizer(QSpanData *data);
+
+ void recalculateFastImages();
++ bool canUseFastImageBlending(QPainter::CompositionMode mode, const QImage &image) const;
+
+ QPaintDevice *device;
+ QScopedPointer<QOutlineMapper> outlineMapper;
diff --git a/debian/patches/Micro-optimization_for_QSpanData.patch b/debian/patches/Micro-optimization_for_QSpanData.patch
new file mode 100644
index 0000000..56254a3
--- /dev/null
+++ b/debian/patches/Micro-optimization_for_QSpanData.patch
@@ -0,0 +1,22 @@
+commit 09317dda494a51d101723131c5a01af4149ac5de
+Author: Andreas Kling <andreas.kling at nokia.com>
+Date: Mon Dec 20 13:04:23 2010 +0100
+
+ Micro-optimization for QSpanData::setup()
+
+ Don't call QColor::rgba() in a macro arg that gets evaluated multiple times.
+
+ Reviewed-by: Samuel Rødal
+
+--- a/src/gui/painting/qpaintengine_raster.cpp
++++ b/src/gui/painting/qpaintengine_raster.cpp
+@@ -5139,7 +5139,8 @@ void QSpanData::setup(const QBrush &brus
+ case Qt::SolidPattern: {
+ type = Solid;
+ QColor c = qbrush_color(brush);
+- solid.color = PREMUL(ARGB_COMBINE_ALPHA(c.rgba(), alpha));
++ QRgb rgba = c.rgba();
++ solid.color = PREMUL(ARGB_COMBINE_ALPHA(rgba, alpha));
+ if ((solid.color & 0xff000000) == 0
+ && compositionMode == QPainter::CompositionMode_SourceOver) {
+ type = None;
diff --git a/debian/patches/Prevent_recursion_when_creating_window_surface.patch b/debian/patches/Prevent_recursion_when_creating_window_surface.patch
new file mode 100644
index 0000000..f6799bf
--- /dev/null
+++ b/debian/patches/Prevent_recursion_when_creating_window_surface.patch
@@ -0,0 +1,37 @@
+commit 5ad8cd48a1ed3be183c0af8698491b039f0054e4
+Author: Samuel Rødal <samuel.rodal at nokia.com>
+Date: Tue Feb 1 17:59:54 2011 +0100
+
+ Prevent recursion when creating window surface.
+
+ If we can't access the qt_gl_share_widget() we should just create a
+ raster window surface. This might happen when creating the share widget
+ itself leads to creation of a window surface (which isn't really going
+ to be used anyways).
+
+ Reviewed-by: Michael Dominic K
+
+--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
++++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+@@ -42,6 +42,7 @@
+ #include <QDebug>
+ #include <private/qpixmap_raster_p.h>
+ #include <private/qwindowsurface_gl_p.h>
++#include <private/qwindowsurface_raster_p.h>
+ #include <private/qegl_p.h>
+ #include <private/qglextensions_p.h>
+ #include <private/qgl_p.h>
+@@ -75,7 +76,12 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSys
+
+ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
+ {
+- QGLShareContextScope ctx(qt_gl_share_widget()->context());
++ QGLWidget *shareWidget = qt_gl_share_widget();
++
++ if (!shareWidget)
++ return new QRasterWindowSurface(widget);
++
++ QGLShareContextScope ctx(shareWidget->context());
+
+ QMeeGoGraphicsSystem::surfaceWasCreated = true;
+ QWindowSurface *surface = new QGLWindowSurface(widget);
diff --git a/debian/patches/Some_Optimizations_for_the_gray_raster.patch b/debian/patches/Some_Optimizations_for_the_gray_raster.patch
new file mode 100644
index 0000000..305bbee
--- /dev/null
+++ b/debian/patches/Some_Optimizations_for_the_gray_raster.patch
@@ -0,0 +1,99 @@
+commit 7eb560609cf1fc82f897a9a67c76e42b06823f9b
+Author: Samuel Rødal <samuel.rodal at nokia.com>
+Date: Thu Nov 18 12:06:41 2010 +0100
+
+ Some optimizations for the gray-raster (raster engine antialiasing).
+
+ Increase the size of the initial memory pool (it's anyways free'd later
+ on) to improve the performance of the rasterizer and also decrease the
+ chance of re-allocations.
+
+ Also, by combining gray_record_cell and gray_find_cell into one
+ function, as gray_find_cell is only called from the former, we can skip
+ some unnecessary operations.
+
+ Measured performance improvements range from 58 % to 154 % for rounded
+ rect filling and stroking.
+
+ Reviewed-by: Andreas Kling
+
+--- a/src/gui/painting/qgrayraster.c
++++ b/src/gui/painting/qgrayraster.c
+@@ -408,25 +408,31 @@
+ /* */
+ /* Record the current cell in the table. */
+ /* */
+- static PCell
+- gray_find_cell( RAS_ARG )
++ static void
++ gray_record_cell( RAS_ARG )
+ {
+ PCell *pcell, cell;
+ int x = ras.ex;
+
++ if ( ras.invalid || !( ras.area | ras.cover ) )
++ return;
+
+ if ( x > ras.max_ex )
+ x = ras.max_ex;
+
+ pcell = &ras.ycells[ras.ey];
++
+ for (;;)
+ {
+ cell = *pcell;
+ if ( cell == NULL || cell->x > x )
+ break;
+
+- if ( cell->x == x )
+- goto Exit;
++ if ( cell->x == x ) {
++ cell->area += ras.area;
++ cell->cover += ras.cover;
++ return;
++ }
+
+ pcell = &cell->next;
+ }
+@@ -436,28 +442,11 @@
+
+ cell = ras.cells + ras.num_cells++;
+ cell->x = x;
+- cell->area = 0;
+- cell->cover = 0;
++ cell->area = ras.area;
++ cell->cover = ras.cover;
+
+ cell->next = *pcell;
+ *pcell = cell;
+-
+- Exit:
+- return cell;
+- }
+-
+-
+- static void
+- gray_record_cell( RAS_ARG )
+- {
+- if ( !ras.invalid && ( ras.area | ras.cover ) )
+- {
+- PCell cell = gray_find_cell( RAS_VAR );
+-
+-
+- cell->area += ras.area;
+- cell->cover += ras.cover;
+- }
+ }
+
+
+--- a/src/gui/painting/qgrayraster_p.h
++++ b/src/gui/painting/qgrayraster_p.h
+@@ -91,7 +91,7 @@
+
+ /* Minimum buffer size for raster object, that accounts
+ for TWorker and TCell sizes.*/
+-#define MINIMUM_POOL_SIZE 4096
++#define MINIMUM_POOL_SIZE 8192
+
+ QT_FT_EXPORT_VAR( const QT_FT_Raster_Funcs ) qt_ft_grays_raster;
+
diff --git a/debian/patches/Update_createwindow_in_qgl_x11egl.patch b/debian/patches/Update_createwindow_in_qgl_x11egl.patch
new file mode 100644
index 0000000..481db8d
--- /dev/null
+++ b/debian/patches/Update_createwindow_in_qgl_x11egl.patch
@@ -0,0 +1,38 @@
+From 0aef3363aca14b0ba6ac56f86cadeb4acdef729e Mon Sep 17 00:00:00 2001
+From: JuanZhao <juan.j.zhao at intel.com>
+Date: Tue, 12 Apr 2011 09:37:53 +0200
+Subject: [PATCH] Update XCreateWindow in qgl_X11egl.cpp
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+XCreateWindow should provide mask and colormap, or this may load XCreateWindow error in the server side.
+
+Merge-request: 1183
+Reviewed-by: Samuel Rødal <samuel.rodal at nokia.com>
+---
+ src/opengl/qgl_x11egl.cpp | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+--- a/src/opengl/qgl_x11egl.cpp
++++ b/src/opengl/qgl_x11egl.cpp
+@@ -105,10 +105,18 @@ QGLTemporaryContext::QGLTemporaryContext
+ return;
+ }
+
++ XSetWindowAttributes attr;
++ unsigned long mask;
++ attr.background_pixel = 0;
++ attr.border_pixel = 0;
++ attr.colormap = XCreateColormap(X11->display, DefaultRootWindow(X11->display), vi->visual, AllocNone);
++ attr.event_mask = StructureNotifyMask | ExposureMask;
++ mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
++
+ d->window = XCreateWindow(X11->display, RootWindow(X11->display, screen),
+ 0, 0, 1, 1, 0,
+ vi->depth, InputOutput, vi->visual,
+- 0, 0);
++ mask, &attr);
+
+ d->surface = eglCreateWindowSurface(d->display, config, (EGLNativeWindowType) d->window, NULL);
+
diff --git a/debian/patches/series b/debian/patches/series
index 29af310..da3a8fd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,14 @@
# upstream patches
+Fix_GL_problems_on_stock_1.4_SGX_drivers.patch
+Fixed_missing_text_when_using_static_text_items_in_GL_2_engine.patch
+Update_createwindow_in_qgl_x11egl.patch
+Improve-performance-of-partial-updates-in-raster-win.patch
+Fix_transformIsSimple_in_QGraphicsScene.patch
+Micro-optimization_for_QSpanData.patch
+Some_Optimizations_for_the_gray_raster.patch
+Make_use_of_the_fast_image_paths.patch
+Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
+Prevent_recursion_when_creating_window_surface.patch
# qt-copy patches
0195-compositing-properties.diff
--
Qt 4 packaging
More information about the pkg-kde-commits
mailing list