summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
authorToma┼ż Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-06-24 16:42:45 +0800
committerJan Holesovsky <kendy@collabora.com>2016-06-24 12:54:01 +0000
commitaf6dfe3c4cb9a97ec4bb91068c68665a8710cd40 (patch)
tree150d388da91ce0206cd79e269d0dfe512dcaf83d /vcl/opengl/gdiimpl.cxx
parent91f2f71e7b936c3c9fb984aaa01d432926abb38f (diff)
tdf#100411 start the flush timer when batching (PostBatchDraw)
When we batch a draw command we need to start the flush timer (if not already started) as otherwise it could happen that we won't flush the offscreen texture at the correct time or at all. This fixes a problem with drawing of pop-up "help" text. (cherry picked from commit e1296e295e7d4f1104d2c90b1f51d52251358bea) Change-Id: I6afcf173c3ac517ed0612cd413d95e28c19faa81 Reviewed-on: https://gerrit.libreoffice.org/26629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx10
1 files changed, 10 insertions, 0 deletions
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()