diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-12-02 09:08:57 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-03 14:41:17 +0100 |
commit | 1f81123d8cb42fe1ba4d7f5922474fdabb171d1d (patch) | |
tree | 5e505931d0d5064060e7ea7a0ce15956febdf1ba /vcl | |
parent | b1cfad5e8b38fc02de498993cf46e2404ced1058 (diff) |
vcl: Release the OpenGL context for offscreen rendering after each operation
Change-Id: If253a4c0a1f64b1cc54e0079d4455abf39620ac0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index e836e821f82f..f4fb17d8bacd 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -161,6 +161,11 @@ void OpenGLSalGraphicsImpl::PostDraw() mpFramebuffer = NULL; CHECK_GL_ERROR(); + + // release the context as there is no guarantee the underlying window + // will still be valid for the next draw operation + if( mbOffscreen ) + ReleaseContext(); } void OpenGLSalGraphicsImpl::freeResources() |