From d344b6cc3d8c356fa4f283df7368916eca35378c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 11 Feb 2015 11:09:50 +0100 Subject: [PATCH] Fix glPixelStore in GLTexture::update Resetting glPixelStore is bound to the variable useUnpack, but setting was only bound to a subset of the checks going into useUnpack variable. This could cause an assert if one updated with a QImage not in format ARGB32_Premultiplied. REVIEW: 122521 --- libkwineffects/kwingltexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp index ad6afffd17..ab38883d88 100644 --- a/libkwineffects/kwingltexture.cpp +++ b/libkwineffects/kwingltexture.cpp @@ -338,7 +338,7 @@ void GLTexture::update(const QImage &image, const QPoint &offset, const QRect &s QImage tmpImage; if (!src.isNull()) { - if (d->s_supportsUnpack) { + if (useUnpack) { glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width()); glPixelStorei(GL_UNPACK_SKIP_PIXELS, src.x()); glPixelStorei(GL_UNPACK_SKIP_ROWS, src.y());