summaryrefslogtreecommitdiff
path: root/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-01-04 16:38:25 +0100
committerKoen Kooi <koen@openembedded.org>2010-01-05 10:07:58 +0100
commit4a3a725cc558b2841959c84529389c97587eae45 (patch)
tree8985a4997feccd22c565c4ebb6f3b92d9b563570 /recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch
parent1029524234e0d6da592b946803cbd09b882acf2e (diff)
qt 4.6.0: backport a few patches from git, mainly QGL related
Diffstat (limited to 'recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch')
-rw-r--r--recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch b/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch
new file mode 100644
index 0000000000..301fba29fd
--- /dev/null
+++ b/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch
@@ -0,0 +1,33 @@
+From 51297287f1be5c31337203cbf5a0e3eae6047a88 Mon Sep 17 00:00:00 2001
+From: Rhys Weatherley <rhys.weatherley@nokia.com>
+Date: Wed, 9 Dec 2009 08:46:37 +1000
+Subject: [PATCH 0992/1244] Make sure a context is current when loading compressed textures.
+
+Reviewed-by: trustme
+---
+ src/opengl/qpixmapdata_gl.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
+index 0299cea..4e1d50d 100644
+--- a/src/opengl/qpixmapdata_gl.cpp
++++ b/src/opengl/qpixmapdata_gl.cpp
+@@ -424,6 +424,7 @@ bool QGLPixmapData::fromFile(const QString &filename, const char *format,
+ resize(0, 0);
+ data = file.readAll();
+ file.close();
++ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QSize size = m_texture.bindCompressedTexture
+ (data.constData(), data.size(), format);
+ if (!size.isEmpty()) {
+@@ -449,6 +450,7 @@ bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format,
+ const char *buf = reinterpret_cast<const char *>(buffer);
+ if (m_texture.canBindCompressedTexture(buf, int(len), format, &alpha)) {
+ resize(0, 0);
++ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QSize size = m_texture.bindCompressedTexture(buf, int(len), format);
+ if (!size.isEmpty()) {
+ w = size.width();
+--
+1.6.5
+