Change-Id: I24eb1c5c884e80017d8a1123120538553e825064
Reviewed-on: http://codereview.qt.nokia.com/3443
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
This function might not work if the view is not visible.
\warning Calling this function will cause performance problems.
+
+ \warning This function can only be called from the GUI thread.
*/
QImage QSGCanvas::grabFrameBuffer()
{
if (!isRunning())
return QImage();
+ if (QThread::currentThread() != qApp->thread()) {
+ qWarning("QSGCanvas::grabFrameBuffer: can only be called from the GUI thread");
+ return QImage();
+ }
+
#ifdef THREAD_DEBUG
printf("GUI: doing a pixelwise grab..\n");
#endif