aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgshadereffectsource.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@nokia.com>2011-08-24 15:48:03 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-25 08:26:20 +0200
commit15e62e98ad6fa73f052113c158b24549b7b28e4f (patch)
tree575664c4c0f3f7ff7e63fc31e39ed53dcde210c8 /src/declarative/items/qsgshadereffectsource.cpp
parent0d84e957297b4ffa6ab5b0b5bcf8b169d567d298 (diff)
Get the image of the FBO of a effect texture
The Qml Designer needs this image because every item in the text file is rendered in an external process in an image and send over a socket to the main process. Change-Id: I73cbc798d783098d3e1937181259c227b008082e Reviewed-on: http://codereview.qt.nokia.com/3509 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/declarative/items/qsgshadereffectsource.cpp')
-rw-r--r--src/declarative/items/qsgshadereffectsource.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/items/qsgshadereffectsource.cpp b/src/declarative/items/qsgshadereffectsource.cpp
index d7653b578b..e05d20ed69 100644
--- a/src/declarative/items/qsgshadereffectsource.cpp
+++ b/src/declarative/items/qsgshadereffectsource.cpp
@@ -365,6 +365,14 @@ void QSGShaderEffectTexture::grab()
markDirtyTexture(); // Continuously update if 'live' and 'recursive'.
}
+QImage QSGShaderEffectTexture::toImage() const
+{
+ if (m_fbo)
+ return m_fbo->toImage();
+
+ return QImage();
+}
+
/*!
\qmlclass ShaderEffectSource QSGShaderEffectSource
\since 5.0