From 312fea50f8f5f2a114061b924a1cbf05850167d9 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 19 Sep 2011 09:23:29 +0200 Subject: Avoid unnecessary detach of a QImage in QPixmapDropShadowFilter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 1374 Reviewed-by: Samuel Rødal --- src/gui/image/qpixmapfilter.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index a33e173..6c03990 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -1362,16 +1362,14 @@ void QPixmapDropShadowFilter::draw(QPainter *p, qt_blurImage(&blurPainter, tmp, d->radius, false, true); blurPainter.end(); - tmp = blurred; - // blacken the image... - tmpPainter.begin(&tmp); - tmpPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - tmpPainter.fillRect(tmp.rect(), d->color); - tmpPainter.end(); + QPainter blackenPainter(&blurred); + blackenPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); + blackenPainter.fillRect(blurred.rect(), d->color); + blackenPainter.end(); // draw the blurred drop shadow... - p->drawImage(pos, tmp); + p->drawImage(pos, blurred); // Draw the actual pixmap... p->drawPixmap(pos, px, src); -- cgit v0.12 From f9bd50e37bee0bb4d243887ae684b46f6b6750fe Mon Sep 17 00:00:00 2001 From: Reuben Dowle Date: Mon, 19 Sep 2011 09:46:50 +0200 Subject: stop tslib plugin having same file name as linux input plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 1330 Reviewed-by: Samuel Rødal --- src/plugins/generic/tslib/tslib.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/generic/tslib/tslib.pro b/src/plugins/generic/tslib/tslib.pro index 74c7fd2..760fbae 100644 --- a/src/plugins/generic/tslib/tslib.pro +++ b/src/plugins/generic/tslib/tslib.pro @@ -1,4 +1,4 @@ -TARGET = qlinuxinputplugin +TARGET = qtslibplugin include(../../qpluginbase.pri) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/generic -- cgit v0.12 From 5eb449ddc0d9f5019082daf6804a048f88ff39c7 Mon Sep 17 00:00:00 2001 From: Gerhard Roethlin Date: Mon, 19 Sep 2011 10:01:21 +0200 Subject: 4.8 Changes: OpenGL Framebuffer Format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an entry for the OpenGL Framebuffer Format commit to the 4.8 changelog. Merge-request: 1387 Reviewed-by: Samuel Rødal --- dist/changes-4.8.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index d094b38..acc107b 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -117,6 +117,8 @@ QtNetwork - Including will not work in combination with GLEW, as QGLFunctions will undefine GLEW's defines. - Optimize behavior of QGLTextureCache + - Reading from the FrameBuffer with Qt now correctly gives an image + marked as premultiplied. QtScript -------- -- cgit v0.12 From 035a05e498568cacbc53017d6f7ee6691c050edb Mon Sep 17 00:00:00 2001 From: Reuben Dowle Date: Mon, 19 Sep 2011 13:04:48 +0200 Subject: Allow generic EGL platform contexts to be shared MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 1331 Reviewed-by: Samuel Rødal --- src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp | 5 +++-- src/plugins/platforms/eglconvenience/qeglplatformcontext.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp b/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp index 4d1d63e..d733cd6 100644 --- a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp +++ b/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp @@ -48,7 +48,7 @@ #include -QEGLPlatformContext::QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi) +QEGLPlatformContext::QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi, QEGLPlatformContext *shareContext) : QPlatformGLContext() , m_eglDisplay(display) , m_eglSurface(surface) @@ -59,7 +59,8 @@ QEGLPlatformContext::QEGLPlatformContext(EGLDisplay display, EGLConfig config, E } eglBindAPI(m_eglApi); - m_eglContext = eglCreateContext(m_eglDisplay,config, 0,contextAttrs); + EGLContext shareEglContext = shareContext ? shareContext->eglContext() : 0; + m_eglContext = eglCreateContext(m_eglDisplay,config, shareEglContext, contextAttrs); if (m_eglContext == EGL_NO_CONTEXT) { qWarning("Could not create the egl context\n"); eglTerminate(m_eglDisplay); diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.h b/src/plugins/platforms/eglconvenience/qeglplatformcontext.h index 9be1480..614b3cb 100644 --- a/src/plugins/platforms/eglconvenience/qeglplatformcontext.h +++ b/src/plugins/platforms/eglconvenience/qeglplatformcontext.h @@ -48,7 +48,7 @@ class QEGLPlatformContext : public QPlatformGLContext { public: - QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi); + QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi, QEGLPlatformContext *shareContext = 0); ~QEGLPlatformContext(); void makeCurrent(); -- cgit v0.12 From 67a1b5e50c1cc90e9c03d9f4cadc9912f6880e15 Mon Sep 17 00:00:00 2001 From: Reuben Dowle Date: Mon, 19 Sep 2011 13:04:50 +0200 Subject: Allow shared EGL contexts for xcb and xlib platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 1331 Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- src/plugins/platforms/xlib/qxlibwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 0a02c7e..ed88138 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -516,7 +516,7 @@ QPlatformGLContext *QXcbWindow::glContext() const EGLSurface eglSurface = eglCreateWindowSurface(display,config,(EGLNativeWindowType)m_window,0); QXcbWindow *that = const_cast(this); - that->m_context = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API); + that->m_context = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API, static_cast(widget()->platformWindowFormat().sharedGLContext())); #elif defined(XCB_USE_DRI2) QXcbWindow *that = const_cast(this); that->m_context = new QDri2Context(that); diff --git a/src/plugins/platforms/xlib/qxlibwindow.cpp b/src/plugins/platforms/xlib/qxlibwindow.cpp index 823fae9..16c5ed5 100644 --- a/src/plugins/platforms/xlib/qxlibwindow.cpp +++ b/src/plugins/platforms/xlib/qxlibwindow.cpp @@ -687,7 +687,7 @@ QPlatformGLContext *QXlibWindow::glContext() const eglContextAttrs.append(EGL_NONE); EGLSurface eglSurface = eglCreateWindowSurface(display,config,(EGLNativeWindowType)x_window,0); - that->mGLContext = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API); + that->mGLContext = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API, static_cast(windowFormat.sharedGLContext())); #endif #endif } -- cgit v0.12 From c750afe0e0f043389d30850070889946e4c6e8af Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Mon, 19 Sep 2011 13:20:13 +0200 Subject: Make sure cursor position doesn't exceed line end If we have trailing spaces at the end of a line, cursor will disappear because the position we returned exceeds line end, thus the widget border. By limiting it within line.width we can make sure it always visible, which is more consistent to the behavior in common platforms. Reviewed-by: Eskil --- src/gui/text/qtextlayout.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index d0c1a0e..a2662c4 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2612,6 +2612,9 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const x += eng->offsetInLigature(si, pos, end, glyph_pos); } + if (x > line.width) + x = line.width; + *cursorPos = pos + si->position; return x.toReal(); } -- cgit v0.12 From 128c4166ba445112ab73dd98b3e403da0489656e Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 20 Sep 2011 13:42:35 +0200 Subject: Only limit cursor position when line is wrapped Reviewed-by: Eskil --- src/gui/text/qtextlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index a2662c4..a86cf05 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2612,7 +2612,7 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const x += eng->offsetInLigature(si, pos, end, glyph_pos); } - if (x > line.width) + if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.width) x = line.width; *cursorPos = pos + si->position; -- cgit v0.12 From 6d1160ebb58a35a70afd689223d167eaf13490fd Mon Sep 17 00:00:00 2001 From: aavit Date: Thu, 22 Sep 2011 11:04:53 +0200 Subject: Update changes-4.8.0 file --- dist/changes-4.8.0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 213068f..a9c0a40 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -33,7 +33,7 @@ General Improvements Third party components ---------------------- - - Updated libpng to version 1.5.1 + - Updated libpng to version 1.5.4 - Updated libjpeg to version 8c - Updated zlib to version 1.2.5 -- cgit v0.12