Merge pull request #7596 from jherico/texture_transfer_fix

Move the texture transfer context back to the main thread for shutdown
This commit is contained in:
Brad Hefta-Gaub 2016-04-07 09:31:42 -07:00
commit 50a081db00
2 changed files with 7 additions and 0 deletions

View file

@ -77,6 +77,12 @@ void GLTextureTransferHelper::setup() {
#endif
}
void GLTextureTransferHelper::shutdown() {
_canvas->doneCurrent();
_canvas->moveToThreadWithContext(qApp->thread());
}
bool GLTextureTransferHelper::processQueueItems(const Queue& messages) {
for (auto package : messages) {
glWaitSync(package.fence, 0, GL_TIMEOUT_IGNORED);

View file

@ -28,6 +28,7 @@ public:
protected:
void setup() override;
void shutdown() override;
bool processQueueItems(const Queue& messages) override;
void transferTextureSynchronous(const gpu::Texture& texture);