diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-03-20 11:43:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-20 11:59:07 +0100 |
commit | 5277a60f56c83376c1f2e9d9d502f1793d8c4857 (patch) | |
tree | dceda35e45ef46731f0932ce9a32a052e03e049b /src/quick/scenegraph/coreapi | |
parent | 3ce2063cfa36a4165445c6e41a4add198a78aa06 (diff) |
Clearly point out the distinction between GUI and Render threads.
This is something it is easy to get wrong, so try to make it as
visible as possible.
Change-Id: I2253ae63214cef0fb91c8b9423d7918ffc20e888
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 3 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.cpp | 11 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgnode.cpp | 19 |
3 files changed, 27 insertions, 6 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index 40e0a014ab..43ff1b6240 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -286,6 +286,9 @@ const QSGGeometry::AttributeSet &QSGGeometry::defaultAttributes_ColoredPoint2D() \sa QSGGeometryNode, {Scene Graph - Custom Geometry} + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. + */ /*! diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 4954fe20bb..22fe29959e 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -166,8 +166,8 @@ static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty(); }; \endcode - \warning Instances of QSGMaterialShader belongs to the Scene Graph rendering - thread, and cannot be used from the GUI thread. + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ @@ -550,6 +550,9 @@ static void qt_print_material_count() \ingroup qtquick-scenegraph-materials It serves no purpose outside the QSGMaterial::type() function. + + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ /*! @@ -585,8 +588,8 @@ static void qt_print_material_count() }; \endcode - \warning Instances of QSGMaterial belongs to the Scene Graph rendering thread, - and cannot be used from the GUI thread. + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ /*! diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index 5c196b252c..b0a4f20149 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -99,8 +99,8 @@ static void qt_print_node_count() together. Nodes in a blocked subtree will not be preprocessed() and not rendered. - \warning Anything related to QSGNode should happen on the scene graph - rendering thread. + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ /*! @@ -683,6 +683,9 @@ void qsgnode_set_description(QSGNode *node, const QString &description) The QSGBasicGeometryNode class should not be used by itself. It is only encapsulates shared functionality between the QSGGeometryNode and QSGClipNode classes. + + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ @@ -824,6 +827,9 @@ void QSGBasicGeometryNode::setGeometry(QSGGeometry *geometry) to avoid an extra operation in the fragment shader can have significant performance impact on embedded graphics chips. The opaque material is optional. + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. + \sa QSGGeometry, QSGMaterial, QSGSimpleMaterial */ @@ -1036,6 +1042,9 @@ void QSGGeometryNode::setInheritedOpacity(qreal opacity) Clip nodes must have a geometry before they can be added to the scene graph. Clipping is usually implemented by using the stencil buffer. + + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ @@ -1127,6 +1136,10 @@ void QSGClipNode::setClipRect(const QRectF &rect) transformations. However, because the renderer optimizes for 2D use-cases rather than 3D use-cases, rendering a scene with full 3D transformations needs to be done with some care. + + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. + */ @@ -1264,6 +1277,8 @@ void QSGRootNode::notifyNodeChange(QSGNode *node, DirtyState state) be marked as blocked, causing isSubtreeBlocked() to return true. This is done for performance reasons. + \note All classes with QSG prefix should be used solely on the scene graph's + rendering thread. See \l {Scene Graph and Rendering} for more information. */ |