From 0f0ed2070333d61a2603cf3e9bc0cb15439e1177 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 16 Oct 2018 13:08:10 +0200 Subject: At least warn when triggering a rendering limitation We can only have up to 65536/4 tiles since we are indexing with quint16. Task-number: QTBUG-58924 Change-Id: I55b5a9f2a3fb4582e327859482dd978b61b21e4e Reviewed-by: Laszlo Agocs --- src/quick/scenegraph/qsgbasicinternalimagenode.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/quick') diff --git a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp index c8699218ba..4effaa154d 100644 --- a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp +++ b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp @@ -230,6 +230,9 @@ QSGGeometry *QSGBasicInternalImageNode::updateGeometry(const QRectF &targetRect, ++vCells; if (innerTargetRect.bottom() != targetRect.bottom()) ++vCells; + if (hCells * vCells * 4 >= 0x10000) + qWarning("QTBUG-58924 - Too many tiles in QSGInternalImageNode, rendering will be partially missing."); + QVarLengthArray xData(2 * hCells); QVarLengthArray yData(2 * vCells); X *xs = xData.data(); -- cgit v1.2.3