summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qpnghandler.cpp7
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp4
2 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 3c88d2e9c1..7fbd24787e 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -676,16 +676,9 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
&& num_palette <= 256)
{
// 1-bit and 8-bit color
- if (bit_depth != 1)
- png_set_packing(png_ptr);
- png_read_update_info(png_ptr, info_ptr);
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
format = bit_depth == 1 ? QImage::Format_Mono : QImage::Format_Indexed8;
} else {
// 32-bit
- if (bit_depth == 16)
- png_set_strip_16(png_ptr);
-
format = QImage::Format_ARGB32;
// Only add filler if no alpha, or we can get 5 channel data.
if (!(color_type & PNG_COLOR_MASK_ALPHA)
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index b9cf81b30e..f98f8a496c 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -131,6 +131,10 @@ bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString,
if (versionParts.size() >= 2) {
major = versionParts.at(0).toInt(&majorOk);
minor = versionParts.at(1).toInt(&minorOk);
+ // Nexus 6 has "OpenGL ES 3.0V@95.0 (GIT@I86da836d38)"
+ if (!minorOk)
+ if (int idx = versionParts.at(1).indexOf('V'))
+ minor = versionParts.at(1).left(idx).toInt(&minorOk);
} else {
qWarning("Unrecognized OpenGL ES version");
}