diff options
author | Florian Haenel <florian.haenel@lge.com> | 2013-06-08 00:49:24 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-06-14 12:11:50 +0200 |
commit | e1223d648c15aed72398b5f992d40ae03487bb32 (patch) | |
tree | 6cea965f1ca85c2686cc6b112c585f716e9f3da4 /recipes-qt/qt5/qtdeclarative | |
parent | 46626d15cde20c665f99c2564f01d3cd95cc0831 (diff) | |
download | meta-qt5-e1223d648c15aed72398b5f992d40ae03487bb32.tar.gz |
qtdeclarative-5.0.2: Add 4 patches for runtime issues
* 3 backports from newer qtdeclarative:
System Hang while moving App Ribbon
Fix for segfault in some ListView Cases
Make use of BGRA texture format to improve image upload time
* 1 pending fix:
Fix for ViewTransitions not working in horizontal ListViews
Signed-off-by: Florian Haenel <florian.haenel@lge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtdeclarative')
4 files changed, 198 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtdeclarative/0002-Fix-displacement-transition-bug-for-horizontal-case.patch b/recipes-qt/qt5/qtdeclarative/0002-Fix-displacement-transition-bug-for-horizontal-case.patch new file mode 100644 index 00000000..91740ac7 --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative/0002-Fix-displacement-transition-bug-for-horizontal-case.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From eb11863cc40048e84cb383ae9e29b5929170a63d Mon Sep 17 00:00:00 2001 | ||
2 | From: Guenter Schwann <guenter.schwann@canonical.com> | ||
3 | Date: Wed, 27 Feb 2013 15:52:03 +0100 | ||
4 | Subject: [PATCH 2/5] Fix displacement transition bug for horizontal case | ||
5 | |||
6 | Task-number: QTBUG-29944 | ||
7 | |||
8 | Upstream-Status: Backport https://codereview.qt-project.org/49226 | ||
9 | Signed-off-by: Florian Haenel <florian.haenel@lge.com> | ||
10 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
11 | |||
12 | Change-Id: I23381f7a1d2c8d3c6df007b5b11c12b0db3bb1e9 | ||
13 | --- | ||
14 | src/quick/items/qquickitemview.cpp | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp | ||
18 | index b73fb8c..1c74288 100644 | ||
19 | --- a/src/quick/items/qquickitemview.cpp | ||
20 | +++ b/src/quick/items/qquickitemview.cpp | ||
21 | @@ -2115,7 +2115,7 @@ void QQuickItemViewPrivate::prepareVisibleItemTransitions() | ||
22 | return; | ||
23 | |||
24 | // must call for every visible item to init or discard transitions | ||
25 | - QRectF viewBounds(0, position(), q->width(), q->height()); | ||
26 | + QRectF viewBounds(q->contentX(), q->contentY(), q->width(), q->height()); | ||
27 | for (int i=0; i<visibleItems.count(); i++) | ||
28 | visibleItems[i]->prepareTransition(transitioner, viewBounds); | ||
29 | } | ||
30 | -- | ||
31 | 1.8.2.1 | ||
32 | |||
diff --git a/recipes-qt/qt5/qtdeclarative/0003-Fix-wrong-calculation-of-viewPort-for-transitions.patch b/recipes-qt/qt5/qtdeclarative/0003-Fix-wrong-calculation-of-viewPort-for-transitions.patch new file mode 100644 index 00000000..05451af5 --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative/0003-Fix-wrong-calculation-of-viewPort-for-transitions.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 3dfa028b27e171cb2494b22f0346be1390310ea6 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Florian=20H=C3=A4nel?= <florian.haenel@basyskom.com> | ||
3 | Date: Wed, 5 Jun 2013 19:23:32 +0200 | ||
4 | Subject: [PATCH 3/5] Fix wrong calculation of viewPort for transitions | ||
5 | |||
6 | Viewport is calculated wrong for horizontal layout in a second instance | ||
7 | |||
8 | Task-number: QTBUG-29944 | ||
9 | Task-Number: QTBUG-31546 | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Looks like backport of https://codereview.qt-project.org/49226 but this | ||
14 | one was applied in previous patch, this change looks the same but is | ||
15 | in different part of qquickitemview.cpp and ISN'T applied yet in dev | ||
16 | branch. | ||
17 | |||
18 | Signed-off-by: Florian Haenel <florian.haenel@lge.com> | ||
19 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
20 | |||
21 | Change-Id: I136ae4484278d14f796613505e3f38c65ec51ebe | ||
22 | --- | ||
23 | src/quick/items/qquickitemview.cpp | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp | ||
27 | index 1c74288..b316af9 100644 | ||
28 | --- a/src/quick/items/qquickitemview.cpp | ||
29 | +++ b/src/quick/items/qquickitemview.cpp | ||
30 | @@ -1816,7 +1816,7 @@ void QQuickItemViewPrivate::layout() | ||
31 | |||
32 | prepareVisibleItemTransitions(); | ||
33 | |||
34 | - QRectF viewBounds(0, position(), q->width(), q->height()); | ||
35 | + QRectF viewBounds(q->contentX(), q->contentY(), q->width(), q->height()); | ||
36 | for (QList<FxViewItem*>::Iterator it = releasePendingTransition.begin(); | ||
37 | it != releasePendingTransition.end(); ) { | ||
38 | FxViewItem *item = *it; | ||
39 | -- | ||
40 | 1.8.2.1 | ||
41 | |||
diff --git a/recipes-qt/qt5/qtdeclarative/0004-Fix-null-pointer-access-in-QQuickVisualDataModelPriv.patch b/recipes-qt/qt5/qtdeclarative/0004-Fix-null-pointer-access-in-QQuickVisualDataModelPriv.patch new file mode 100644 index 00000000..0182248e --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative/0004-Fix-null-pointer-access-in-QQuickVisualDataModelPriv.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From adb69cabeacbe14a4439473107000d6e94d8d033 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Florian=20H=C3=A4nel?= <florian.haenel@basyskom.com> | ||
3 | Date: Mon, 3 Jun 2013 13:40:09 +0200 | ||
4 | Subject: [PATCH 4/5] Fix null-pointer access in QQuickVisualDataModelPrivate | ||
5 | |||
6 | I observed null cachItem->contextData which lead to null-pointer access | ||
7 | on cacheItem->contextData->destroy(). | ||
8 | |||
9 | Task-number: QTBUG-31439 | ||
10 | |||
11 | Upstream-Status: Backport https://codereview.qt-project.org/57789 | ||
12 | |||
13 | Signed-of-by: Florian Haenel <florian.haenel@lge.com> | ||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | |||
16 | Change-Id: I91f28a3ee1ac83446ecde1801a1cb7962fb883f3 | ||
17 | --- | ||
18 | src/quick/items/qquickvisualdatamodel.cpp | 3 ++- | ||
19 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp | ||
22 | index d2e50e8..a460e7f 100644 | ||
23 | --- a/src/quick/items/qquickvisualdatamodel.cpp | ||
24 | +++ b/src/quick/items/qquickvisualdatamodel.cpp | ||
25 | @@ -817,7 +817,8 @@ void QQuickVisualDataModelPrivate::incubatorStatusChanged(QVDMIncubationTask *in | ||
26 | delete cacheItem->object; | ||
27 | cacheItem->object = 0; | ||
28 | cacheItem->scriptRef -= 1; | ||
29 | - cacheItem->contextData->destroy(); | ||
30 | + if (cacheItem->contextData) | ||
31 | + cacheItem->contextData->destroy(); | ||
32 | cacheItem->contextData = 0; | ||
33 | if (!cacheItem->isReferenced()) { | ||
34 | removeCacheItem(cacheItem); | ||
35 | -- | ||
36 | 1.8.2.1 | ||
37 | |||
diff --git a/recipes-qt/qt5/qtdeclarative/0005-Avoid-swizzling-on-OpenGL-ES-when-possible.patch b/recipes-qt/qt5/qtdeclarative/0005-Avoid-swizzling-on-OpenGL-ES-when-possible.patch new file mode 100644 index 00000000..92be7ef8 --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative/0005-Avoid-swizzling-on-OpenGL-ES-when-possible.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 9d85c3c5823c6f73db245d4de786d911fd96edfd Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Haenel <florian.haenel@lge.com> | ||
3 | Date: Sat, 8 Jun 2013 00:34:35 +0200 | ||
4 | Subject: [PATCH 5/5] Avoid swizzling on OpenGL ES when possible | ||
5 | |||
6 | Add support for APPLE_texture_format_BGRA8888, | ||
7 | IMG_texture_format_BGRA8888, | ||
8 | EXT_texture_format_BGRA8888 and EXT_bgra. The apple one acts | ||
9 | just like the desktop EXT_bgra one, so they need slightly | ||
10 | different handling than the ES extensions. | ||
11 | |||
12 | This change also has the benefit that we no longer have a dedicated | ||
13 | ES path. | ||
14 | |||
15 | Upstream-Status: Backport https://codereview.qt-project.org/46549 | ||
16 | Signed-off-by: Florian Haenel <florian.haenel@lge.com> | ||
17 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
18 | |||
19 | Change-Id: I5ecb0a02c3a7bd984d6752fa87163726118b93de | ||
20 | --- | ||
21 | src/quick/scenegraph/util/qsgtexture.cpp | 28 ++++++++++++++++++++++------ | ||
22 | 1 file changed, 22 insertions(+), 6 deletions(-) | ||
23 | |||
24 | diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp | ||
25 | index 16cc461..3d574f3 100644 | ||
26 | --- a/src/quick/scenegraph/util/qsgtexture.cpp | ||
27 | +++ b/src/quick/scenegraph/util/qsgtexture.cpp | ||
28 | @@ -65,6 +65,10 @@ | ||
29 | #include <QHash> | ||
30 | #endif | ||
31 | |||
32 | +#ifndef GL_BGRA | ||
33 | +#define GL_BGRA 0x80E1 | ||
34 | +#endif | ||
35 | + | ||
36 | QT_BEGIN_NAMESPACE | ||
37 | |||
38 | inline static bool isPowerOfTwo(int x) | ||
39 | @@ -523,7 +527,6 @@ QSGPlainTexture::~QSGPlainTexture() | ||
40 | glDeleteTextures(1, &m_texture_id); | ||
41 | } | ||
42 | |||
43 | -#ifdef QT_OPENGL_ES | ||
44 | void qsg_swizzleBGRAToRGBA(QImage *image) | ||
45 | { | ||
46 | const int width = image->width(); | ||
47 | @@ -534,7 +537,6 @@ void qsg_swizzleBGRAToRGBA(QImage *image) | ||
48 | p[x] = ((p[x] << 16) & 0xff0000) | ((p[x] >> 16) & 0xff) | (p[x] & 0xff00ff00); | ||
49 | } | ||
50 | } | ||
51 | -#endif | ||
52 | |||
53 | void QSGPlainTexture::setImage(const QImage &image) | ||
54 | { | ||
55 | @@ -621,12 +623,26 @@ void QSGPlainTexture::bind() | ||
56 | |||
57 | updateBindOptions(m_dirty_bind_options); | ||
58 | |||
59 | + GLenum externalFormat = GL_RGBA; | ||
60 | + GLenum internalFormat = GL_RGBA; | ||
61 | + | ||
62 | + const char *extensions = (const char *) glGetString(GL_EXTENSIONS); | ||
63 | + if (strstr(extensions, "GL_EXT_bgra")) { | ||
64 | + externalFormat = GL_BGRA; | ||
65 | #ifdef QT_OPENGL_ES | ||
66 | - qsg_swizzleBGRAToRGBA(&tmp); | ||
67 | - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmp.constBits()); | ||
68 | -#else | ||
69 | - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, tmp.constBits()); | ||
70 | + internalFormat = GL_BGRA; | ||
71 | #endif | ||
72 | + } else if (strstr(extensions, "GL_APPLE_texture_format_BGRA8888")) { | ||
73 | + externalFormat = GL_BGRA; | ||
74 | + } else if (strstr(extensions, "GL_EXT_texture_format_BGRA8888") | ||
75 | + || strstr(extensions, "GL_IMG_texture_format_BGRA8888")) { | ||
76 | + externalFormat = GL_BGRA; | ||
77 | + internalFormat = GL_BGRA; | ||
78 | + } else { | ||
79 | + qsg_swizzleBGRAToRGBA(&tmp); | ||
80 | + } | ||
81 | + | ||
82 | + glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, w, h, 0, externalFormat, GL_UNSIGNED_BYTE, tmp.constBits()); | ||
83 | |||
84 | if (m_has_mipmaps) { | ||
85 | QOpenGLContext *ctx = QOpenGLContext::currentContext(); | ||
86 | -- | ||
87 | 1.8.2.1 | ||
88 | |||