From b674d0d5cc74409d15741a707bd91d2cde8c22bd Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 12 Aug 2016 16:08:15 +0200 Subject: Fix rendering error in some animated gifs The code for handling of the rarely used "restore to previous" frame disposal option would mistakenly clear the entire existing frame. It looks like this was a copy/paste mistake in the code; the intention obviously was to clear the newly created backingstore instead. This fixes the rendering of http://media1.giphy.com/media/9Jevgp0CgvAnm/giphy.gif Task-number: QTBUG-55141 Change-Id: I4d344b7733edd62346656154e215c21727f9b6bb Reviewed-by: Lars Knoll --- src/gui/image/qgifhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp index 9c748c0373..4197d7e959 100644 --- a/src/gui/image/qgifhandler.cpp +++ b/src/gui/image/qgifhandler.cpp @@ -409,7 +409,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, backingstore = QImage(qMax(backingstore.width(), w), qMax(backingstore.height(), h), QImage::Format_RGB32); - memset(bits, 0, image->byteCount()); + memset(backingstore.bits(), 0, backingstore.byteCount()); } const int dest_bpl = backingstore.bytesPerLine(); unsigned char *dest_data = backingstore.bits(); -- cgit v1.2.3 From 0d994523394c74911b32f29036b5bc13d9f5122f Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 17 Aug 2016 12:42:19 +0200 Subject: Protect QImage::convertToFormat against null QImage QImage may have a null d-pointer, and convertToFormat_helper was the only method not protected against it. Change-Id: Ibfe5b139e3922f2a0c8284c6ae1932c2150efc66 Reviewed-by: Marc Mutz --- src/gui/image/qimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index ee77a32b86..17d3c02e36 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2117,7 +2117,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format, */ QImage QImage::convertToFormat(Format format, const QVector &colorTable, Qt::ImageConversionFlags flags) const { - if (d->format == format) + if (!d || d->format == format) return *this; if (format <= QImage::Format_Indexed8 && depth() == 32) { -- cgit v1.2.3 From 748aa6b06462804a9671997302df292ae9788d5c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 27 Jul 2016 17:16:39 +0200 Subject: Do not disable subpixel rendering on compile time This is a runtime setting, as the user's freetype version can differ from the developer's, and freetype already safely handles it internally when not available. Task-number: QTBUG-55345 Change-Id: I26e73728196d60ae26e5f1919ecd0dadac393890 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 7c878da27f..1711865e59 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -63,7 +63,7 @@ #include FT_CONFIG_OPTIONS_H #endif -#if defined(FT_LCD_FILTER_H) && defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING) +#if defined(FT_LCD_FILTER_H) #define QT_USE_FREETYPE_LCDFILTER #endif -- cgit v1.2.3