summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-10 17:39:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-10 17:39:04 (GMT)
commit6f546de96cc6e841bff8febf29cbf351f4ca49f7 (patch)
tree0f26342dcd5545175342a9d338a137b2e0a6f2b9 /src
parent1f88e7df38aa890cf893cf7f5b60546dbd922bdf (diff)
parent7dc470fd96f50eff923208cdc6e273161062e2a7 (diff)
downloadQt-6f546de96cc6e841bff8febf29cbf351f4ca49f7.zip
Qt-6f546de96cc6e841bff8febf29cbf351f4ca49f7.tar.gz
Qt-6f546de96cc6e841bff8febf29cbf351f4ca49f7.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Worked around driver bug causing clipping errors on N900. Do qFatal() on unsupported screen format instead of crashing later
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h11
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp3
2 files changed, 11 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index ee04166..c88c041 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -331,9 +331,14 @@ static const char* const qglslImageSrcFragmentShader = "\n\
varying highp vec2 textureCoords; \n\
uniform lowp sampler2D imageTexture; \n\
lowp vec4 srcPixel() \n\
- { \n\
- return texture2D(imageTexture, textureCoords); \n\
- }\n";
+ { \n"
+#ifdef QT_OPENGL_ES_2
+ // work-around for driver bug
+ "return 1.0 * texture2D(imageTexture, textureCoords); \n"
+#else
+ "return texture2D(imageTexture, textureCoords); \n"
+#endif
+ "}\n";
static const char* const qglslCustomSrcFragmentShader = "\n\
varying highp vec2 textureCoords; \n\
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index e78fec1..f5ad70c 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -2163,6 +2163,9 @@ bool QVNCScreen::connect(const QString &displaySpec)
if (QScreenDriverFactory::keys().contains(driver, Qt::CaseInsensitive)) {
const int id = getDisplayId(dspec);
QScreen *s = qt_get_screen(id, dspec.toLatin1().constData());
+ if (s->pixelFormat() == QImage::Format_Indexed8
+ || s->pixelFormat() == QImage::Format_Invalid && s->depth() == 8)
+ qFatal("QVNCScreen: unsupported screen format");
setScreen(s);
} else { // create virtual screen
#if Q_BYTE_ORDER == Q_BIG_ENDIAN