Ensure RGB32 images are not converted on upload to atlas.
authorMichael Brasser <michael.brasser@live.com>
Wed, 23 Apr 2014 02:10:58 +0000 (21:10 -0500)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 28 Apr 2014 20:24:58 +0000 (22:24 +0200)
Fixes "Typo No.12" reported at http://www.viva64.com/en/b/0251/

Change-Id: Ifa4d57df68b9515c76a8fb94f87d0a70ba3b5faf
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
src/quick/scenegraph/util/qsgatlastexture.cpp

index b0787e9..17f5460 100644 (file)
@@ -275,7 +275,7 @@ void Atlas::uploadBgra(Texture *texture)
     QImage image = texture->image();
 
     if (image.format() != QImage::Format_ARGB32_Premultiplied
-            || image.format() != QImage::Format_RGB32) {
+            && image.format() != QImage::Format_RGB32) {
         image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
     }