summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-06 14:53:18 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-06 14:53:18 (GMT)
commit97f5d3f102c6b3167872c5ab1c6e0a215cb2f1c1 (patch)
tree08add9bade9cbf0eba585eb56b9bb1a39c9cab1d /src/gui
parent06e8d0cae3651beaf95de05e89696cbab4978740 (diff)
parentce0af99f47c1728a6d8145ea89f41b1c9207104a (diff)
downloadQt-97f5d3f102c6b3167872c5ab1c6e0a215cb2f1c1.zip
Qt-97f5d3f102c6b3167872c5ab1c6e0a215cb2f1c1.tar.gz
Qt-97f5d3f102c6b3167872c5ab1c6e0a215cb2f1c1.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/egl/qegl.cpp2
-rw-r--r--src/gui/image/qimage.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 498245c..6f215cc 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -556,7 +556,7 @@ EGLDisplay QEgl::display()
}
// Resolve the egl extension function pointers:
-#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_base)
+#if (defined(EGL_KHR_image) || defined(EGL_KHR_image_base)) && !defined(EGL_EGLEXT_PROTOTYPES)
if (QEgl::hasExtension("EGL_KHR_image") || QEgl::hasExtension("EGL_KHR_image_base")) {
eglCreateImageKHR = (_eglCreateImageKHR) eglGetProcAddress("eglCreateImageKHR");
eglDestroyImageKHR = (_eglDestroyImageKHR) eglGetProcAddress("eglDestroyImageKHR");
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 233c58d..ce1d6d3 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -5704,9 +5704,10 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
return;
}
- detach();
-
- *this = convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ if (d->format == QImage::Format_ARGB32_Premultiplied)
+ detach();
+ else
+ *this = convertToFormat(QImage::Format_ARGB32_Premultiplied);
// Slight optimization since alphachannels are returned as 8-bit grays.
if (alphaChannel.d->depth == 8 && alphaChannel.isGrayscale()) {