summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2017-09-22 11:12:57 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2017-09-22 12:15:00 +0000
commitabb6af14fb632d32d8cce83b4042acd6f9a4767e (patch)
tree5f0aa9076df8f6c27663c80bf80805d06baa31f2 /src/core/type_conversion.h
parent8041548b7c7fc6f28c23d6c5699bc43ffef2428a (diff)
Fix viewport resizing bug in renderer
After the recent fix for rendering intersecting quads, DelegatedFrameNode no longer builds scene graph nodes for DrawQuads that are outside the visible area. This means that the structure of the scene graph now depends on the size of the visible area, however the logic for deciding whether to update or rebuild the scene graph was not updated to reflect this fact. As a result we may try to update e.g. a QSGImageNode as if it were a QSGRectangleNode leading to a crash. Task-number: QTBUG-62112 Change-Id: I6e2e9dee4238d208fc2be98669281c2d4d4962d7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r--src/core/type_conversion.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index ed02a9db9..39c4f610c 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -139,6 +139,11 @@ inline QRectF toQt(const gfx::RectF &rect)
return QRectF(rect.x(), rect.y(), rect.width(), rect.height());
}
+inline gfx::Size toGfx(const QSize &size)
+{
+ return gfx::Size(size.width(), size.height());
+}
+
inline QSize toQt(const gfx::Size &size)
{
return QSize(size.width(), size.height());