summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx10
2 files changed, 12 insertions, 0 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index df7b9e9e617a..20372689d92e 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -169,6 +169,8 @@ public:
// operations to do after painting
void PostDraw();
+ void PostBatchDraw();
+
protected:
bool AcquireContext(bool bForceCreate = false);
bool ReleaseContext();
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 188db65bfeb0..1422c6a85f34 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -249,6 +249,15 @@ void OpenGLSalGraphicsImpl::PostDraw()
OpenGLZone::leave();
}
+void OpenGLSalGraphicsImpl::PostBatchDraw()
+{
+ if (IsOffscreen())
+ return;
+
+ if (!mpFlush->IsActive())
+ mpFlush->Start();
+}
+
void OpenGLSalGraphicsImpl::ApplyProgramMatrices(float fPixelOffset)
{
mpProgram->ApplyMatrix(GetWidth(), GetHeight(), fPixelOffset);
@@ -1519,6 +1528,7 @@ void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor,
void OpenGLSalGraphicsImpl::DeferredTextDraw(OpenGLTexture& rTexture, SalColor aMaskColor, const SalTwoRect& rPosAry)
{
mpAccumulatedTextures->insert(rTexture, aMaskColor, rPosAry);
+ PostBatchDraw();
}
void OpenGLSalGraphicsImpl::FlushDeferredDrawing()