summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsscene_p.h
diff options
context:
space:
mode:
authorDimitar Asenov <dimitar.asenov@gmail.com>2014-03-12 14:19:04 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-18 19:29:16 +0100
commit9891c5051f02b940f6dc94ac4ccf945e036feb13 (patch)
tree194e1a915407722796f88d952d79cec9dc2b9ebe /src/widgets/graphicsview/qgraphicsscene_p.h
parent4d09a54b7559f32d4824613f90f4016e9446fbd7 (diff)
Add a new optimization property to QGraphicsScene
The minimumRenderSize is a qreal value that is used as a lower bound to determine what items are visible when a scene is rendered. If an item's view-transformed width or height are less than minimumRenderSize then this item is considered to insignificantly affect the final result and is not drawn. If the item clips its children to its shape they are automatically not drawn. This greatly reduces the drawing overhead for scenes with many items rendered in a zoomed out view. [ChangeLog][QtWidgets][QGraphicsScene] Added the minimumRenderSize property which can be used to speed up rendering by not painting items, smaller than a give size. Change-Id: Ie208234707dffb4d2fc620fc5d1514e0c144d9a8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsscene_p.h')
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene_p.h b/src/widgets/graphicsview/qgraphicsscene_p.h
index 9e5bcec488..9f50dcfea7 100644
--- a/src/widgets/graphicsview/qgraphicsscene_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_p.h
@@ -117,6 +117,8 @@ public:
quint32 allItemsIgnoreTouchEvents : 1;
quint32 padding : 15;
+ qreal minimumRenderSize;
+
QRectF growingItemsBoundingRect;
void _q_emitUpdated();