[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/inc vcl/opengl

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Jun 24 12:54:24 UTC 2016


 vcl/inc/openglgdiimpl.hxx |    2 ++
 vcl/opengl/gdiimpl.cxx    |   10 ++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit af6dfe3c4cb9a97ec4bb91068c68665a8710cd40
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Jun 24 16:42:45 2016 +0800

    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 at libreoffice.org>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index ee8c7e2..265d216 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 45c361c..b96ee67 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()


More information about the Libreoffice-commits mailing list