diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-20 12:10:06 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-20 12:10:06 (GMT) |
commit | 0fd2c492ee2e8317a5fbb0fb446816df53d5b17b (patch) | |
tree | 0e2cb6a5a264b95ba5f38a0c279f730cb1fcbdc7 /src | |
parent | 7f11c900e9184565321c09533b468abb047129b8 (diff) | |
parent | 6c8dcd5744e2c14d122f0967de72a9e171dd9715 (diff) | |
download | Qt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.zip Qt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.tar.gz Qt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.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:
Fixes QPen dash offset for OpenGL paint engines (1.x & 2.x).
Support multisampled pbuffers under Windows.
tst_qpixmapfilter: Fix compilation in namespace
qtextcodec_symbian: Add few aliases
Give a warning in QPixmap::handle() if pixmap is not X11 class.
Make QStaticText honor QPainter::pen() for rich text on X11 w/raster
Fixed compilation of MeeGo graphics system without eglext.h
Fixed memory corruption issue in qt_blurImage for Indexed8 images.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/codecs/qtextcodec_symbian.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qpixmap.cpp | 8 | ||||
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 15 | ||||
-rw-r--r-- | src/gui/text/qstatictext.cpp | 5 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 1 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer.cpp | 8 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer_win.cpp | 34 | ||||
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 1 | ||||
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegoextensions.h | 1 |
9 files changed, 53 insertions, 24 deletions
diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index d59998f..9d7e856 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -122,8 +122,8 @@ static const QSymbianCodecInitData codecsData[] = { { /*271085624*/ 271085624, 114, "GB18030\0" }, { /*536929574*/ 536929574, 38, "EUC-KR\0" }, { /*536936703*/ 536936703, 0, "CP949\0" }, - { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" }, - { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0" } + { /*536936705*/ 536936705, 37, "ISO-2022-KR\0csISO2022KR\0" }, + { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0iso-ir-149\0KS_C_5601-1989\0KSC_5601\0Korean\0csKSC56011987\0" } }; diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 66a861d..1e502bd 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1177,8 +1177,12 @@ Qt::HANDLE QPixmap::handle() const { #if defined(Q_WS_X11) const QPixmapData *pd = pixmapData(); - if (pd && pd->classId() == QPixmapData::X11Class) - return static_cast<const QX11PixmapData*>(pd)->handle(); + if (pd) { + if (pd->classId() == QPixmapData::X11Class) + return static_cast<const QX11PixmapData*>(pd)->handle(); + else + qWarning("QPixmap::handle(): Pixmap is not an X11 class pixmap"); + } #endif return 0; } diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 70770c4..26bffcc 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -764,10 +764,17 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp } if (transposed == 0) { - qt_memrotate90(reinterpret_cast<const quint32*>(temp.bits()), - temp.width(), temp.height(), temp.bytesPerLine(), - reinterpret_cast<quint32*>(img.bits()), - img.bytesPerLine()); + if (img.depth() == 8) { + qt_memrotate90(reinterpret_cast<const quint8*>(temp.bits()), + temp.width(), temp.height(), temp.bytesPerLine(), + reinterpret_cast<quint8*>(img.bits()), + img.bytesPerLine()); + } else { + qt_memrotate90(reinterpret_cast<const quint32*>(temp.bits()), + temp.width(), temp.height(), temp.bytesPerLine(), + reinterpret_cast<quint32*>(img.bits()), + img.bytesPerLine()); + } } else { img = temp; } diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 7a5dec4..9506006 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -43,6 +43,7 @@ #include "qstatictext_p.h" #include <private/qtextengine_p.h> #include <private/qfontengine_p.h> +#include <qabstracttextdocumentlayout.h> #include <QtGui/qapplication.h> @@ -654,7 +655,9 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) p->save(); p->translate(topLeftPosition); - document.drawContents(p); + QAbstractTextDocumentLayout::PaintContext ctx; + ctx.palette.setColor(QPalette::Text, p->pen().color()); + document.documentLayout()->draw(p, ctx); p->restore(); if (textWidth >= 0.0) diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 9bc099d..7b0b8a2 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -509,6 +509,7 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c m_dash_stroker.setDashPattern(pen.dashPattern()); m_dash_stroker.setStrokeWidth(cosmetic ? width * m_inv_scale : width); + m_dash_stroker.setDashOffset(pen.dashOffset()); m_dash_stroker.setMiterLimit(pen.miterLimit()); m_dash_stroker.setClipRect(clip); diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 9a8b243..994947b 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -67,7 +67,13 @@ when the pbuffer contents change, eliminating the need for additional copy operations. This is supported only on Windows and Mac OS X systems that provide the \c render_texture - extension. + extension. Note that under Windows, a multi-sampled pbuffer + can't be used in conjunction with the \c render_texture + extension. If a multi-sampled pbuffer is requested under + Windows, the \c render_texture extension is turned off for that + pbuffer. + + \endlist Pbuffers are provided by the OpenGL \c pbuffer extension; call diff --git a/src/opengl/qglpixelbuffer_win.cpp b/src/opengl/qglpixelbuffer_win.cpp index 8d0d105..b55f383 100644 --- a/src/opengl/qglpixelbuffer_win.cpp +++ b/src/opengl/qglpixelbuffer_win.cpp @@ -167,6 +167,11 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con #define WGL_FLOAT_COMPONENTS_NV 0x20B0 #endif +#ifndef WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + QGLFormat pfiToQGLFormat(HDC hdc, int pfi); static void qt_format_to_attrib_list(bool has_render_texture, const QGLFormat &f, int attribs[]) @@ -226,14 +231,12 @@ static void qt_format_to_attrib_list(bool has_render_texture, const QGLFormat &f attribs[i++] = WGL_FLOAT_COMPONENTS_NV; attribs[i++] = TRUE; } - // sample buffers doesn't work in conjunction with the render_texture extension - // so igonre that for now - // if (f.sampleBuffers()) { - // attribs[i++] = WGL_SAMPLE_BUFFERS_ARB; - // attribs[i++] = 1; - // attribs[i++] = WGL_SAMPLES_ARB; - // attribs[i++] = f.samples() == -1 ? 16 : f.samples(); - // } + if (f.sampleBuffers()) { + attribs[i++] = WGL_SAMPLE_BUFFERS_ARB; + attribs[i++] = 1; + attribs[i++] = WGL_SAMPLES_ARB; + attribs[i++] = f.samples() == -1 ? 16 : f.samples(); + } attribs[i] = 0; } @@ -257,12 +260,17 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge dc = GetDC(dmy.winId()); Q_ASSERT(dc); - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = - (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); + // sample buffers doesn't work in conjunction with the render_texture extension + if (f.sampleBuffers()) { + has_render_texture = false; + } else { + PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = + (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); - if (wglGetExtensionsStringARB) { - QString extensions(QLatin1String(wglGetExtensionsStringARB(dc))); - has_render_texture = extensions.contains(QLatin1String("WGL_ARB_render_texture")); + if (wglGetExtensionsStringARB) { + QString extensions(QLatin1String(wglGetExtensionsStringARB(dc))); + has_render_texture = extensions.contains(QLatin1String("WGL_ARB_render_texture")); + } } int attribs[40]; diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 12c487d..a5ec12f 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -921,6 +921,7 @@ static inline QPainterPath strokeForPath(const QPainterPath &path, const QPen &c stroker.setCapStyle(cpen.capStyle()); stroker.setJoinStyle(cpen.joinStyle()); stroker.setMiterLimit(cpen.miterLimit()); + stroker.setDashOffset(cpen.dashOffset()); qreal width = cpen.widthF(); if (width == 0) diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.h b/src/plugins/graphicssystems/meego/qmeegoextensions.h index 7f219de..f1a74f5 100644 --- a/src/plugins/graphicssystems/meego/qmeegoextensions.h +++ b/src/plugins/graphicssystems/meego/qmeegoextensions.h @@ -43,7 +43,6 @@ #define MEXTENSIONS_H #include <EGL/egl.h> -#include <EGL/eglext.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <private/qgl_p.h> |