Move the texture transfer context back to the main thread for shutdown

This commit is contained in:
Brad Davis 2016-04-06 11:29:03 -07:00
parent e76a04951c
commit e194fc39f4
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);