From: Gunnar Sletta Date: Mon, 4 Nov 2013 14:45:22 +0000 (+0100) Subject: Tolerate NaN in the geometry without asserting X-Git-Tag: upstream/5.2.1~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b8dd863601cffbe04fa510395a19318e2fcca24;p=platform%2Fupstream%2Fqtdeclarative.git Tolerate NaN in the geometry without asserting If we come across NaN geometry, we treat it as spanning the entire viewport, similar to other geometries with undefined geometry. Task-number: QTBUG-34520 Change-Id: Ia4171f9f13d876c6c587043ad7decaa19bb85f01 Reviewed-by: Laszlo Agocs --- diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index c27217b..bb98682 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -553,6 +553,15 @@ void Element::computeBounds() vd += g->sizeOfVertex(); } bounds.map(*node->matrix()); + + if (!qIsFinite(bounds.tl.x)) + bounds.tl.x = -FLT_MAX; + if (!qIsFinite(bounds.tl.y)) + bounds.tl.y = -FLT_MAX; + if (!qIsFinite(bounds.br.x)) + bounds.br.x = FLT_MAX; + if (!qIsFinite(bounds.br.y)) + bounds.br.y = FLT_MAX; } RenderNodeElement::~RenderNodeElement()