diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-05-29 10:13:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 19:12:45 +0200 |
commit | 19b1b43f708504fe28552a4670c1137049e016ee (patch) | |
tree | 13e970b27846fb2ad881450d983121e139533520 /src/quick/items/qquickcanvas.cpp | |
parent | 2a3fc36b080e135e630b67a070ec540e94b331b7 (diff) |
Improve QQuickCanvas::createTextureFromImage() docs a bit
Change-Id: I7be40edeee8bfca2a2725e998f64922388b97f64
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index b538dba99a..248195127f 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -2355,10 +2355,21 @@ bool QQuickCanvas::clearBeforeRendering() const The caller of the function is responsible for deleting the returned texture. The actual GL texture will be deleted when the texture object is deleted. + Depending on the underlying implementation of the scene graph, the returned + texture may be part of an atlas. For code to be portable across implementations + one should always use the texture coordinates returned from + QSGTexture::normalizedTextureSubRect() when building geometry. + \warning This function will return 0 if the scene graph has not yet been initialized. - This function can be called both from the GUI thread and the rendering thread. + \warning The returned texture is not memory managed by the scene graph and + must be explicitely deleted by the caller on the rendering thread. + This is acheived by deleting the texture from a QSGNode destructor + or by using deleteLater() in the case where the texture already has affinity + to the rendering thread. + + This function can be called from any thread. \sa sceneGraphInitialized() */ |