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 ee8c7e205926..265d21603dd5 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -170,6 +170,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 45c361c1fa2c..b96ee6728272 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -251,6 +251,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);
@@ -1532,6 +1541,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()