From 4bbf313e9d3cab70c6dab6da4c03bf2ad60aa760 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 28 Mar 2014 15:40:28 +0100 Subject: Fix UI squishing when using QWidget::setRenderToTexture When resizing a window, a window might not be resized synchronously with its backing store. We need to use the actual texture size as the transform to avoid stretching the rendered texture. Change-Id: I945f6d190577ccdcb54483a267a1e42df1ca3156 Reviewed-by: Paul Olav Tvete Reviewed-by: Laszlo Agocs --- src/gui/painting/qplatformbackingstore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting/qplatformbackingstore.h') diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index 76fd3d40b4..4728622cac 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -111,7 +111,7 @@ public: #ifndef QT_NO_OPENGL virtual void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, QOpenGLContext *context); virtual QImage toImage() const; - virtual GLuint toTexture(const QRegion &dirtyRegion) const; + virtual GLuint toTexture(const QRegion &dirtyRegion, QSize *textureSize) const; #endif virtual void resize(const QSize &size, const QRegion &staticContents) = 0; -- cgit v1.2.3