summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx28
1 files changed, 5 insertions, 23 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index c092f0317b1b..e92d86480c9e 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1862,30 +1862,12 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
return true;
}
-void OpenGLSalGraphicsImpl::beginPaint()
+OpenGLContext *OpenGLSalGraphicsImpl::beginPaint()
{
- if( !AcquireContext() )
- return;
-
- mpContext->mnPainting++;
-}
-
-void OpenGLSalGraphicsImpl::endPaint()
-{
- if( !AcquireContext() )
- return;
-
- mpContext->mnPainting--;
- assert( mpContext->mnPainting >= 0 );
- if( mpContext->mnPainting == 0 && !mbOffscreen )
- {
- mpContext->makeCurrent();
- mpContext->AcquireDefaultFramebuffer();
- glFlush();
- mpContext->swapBuffers();
-
- CHECK_GL_ERROR();
- }
+ if( mbOffscreen || !AcquireContext() )
+ return NULL;
+ else
+ return mpContext.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */