diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2016-06-08 15:14:52 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-06-10 12:20:10 +0000 |
commit | 2a999f870e791d99c5c0463a11be05fc5a14dfcc (patch) | |
tree | fe89634142859756f4d12c3e4f5b2560061ea882 /src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp | |
parent | 83dd66ac27db0593a30a4d74d98f9ea0fccbdb36 (diff) |
Software Adaptation: Explicitly detach backingstore image on grab
Some platforms like XCB are just wrapping native images with QImage, and
need to be explicitly copied before returning, as they buffer becomes
invalid once the backingstore is destroyed.
Change-Id: I51f87c5abf4c180c02587f36b5ce4c28e8fa4aed
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp index 300ce6920c..5292e1371f 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp @@ -229,6 +229,7 @@ QImage QSGSoftwareRenderLoop::grab(QQuickWindow *window) renderWindow(window); QImage grabbed = grabContent; + grabbed.detach(); grabContent = QImage(); return grabbed; } |