[Libreoffice-commits] core.git: include/vcl vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Sep 15 09:36:40 UTC 2016


 include/vcl/outdev.hxx             |   17 ---------------
 vcl/source/opengl/OpenGLHelper.cxx |   40 -------------------------------------
 vcl/source/window/paint.cxx        |   12 -----------
 3 files changed, 69 deletions(-)

New commits:
commit 6d17d6930e026aa76310767ba7013bb9e9e889b0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Sep 15 11:35:30 2016 +0200

    Remove OutputDevice::PaintScope
    
    PaintScope was introduced in
        commit bfceb557efcd607ef018ae35fc73f8d61a9b9a4e
        Author: Michael Meeks <michael.meeks at collabora.com>
        Date:   Wed Sep 16 09:17:37 2015 +0100
    
            GL paint-flushing guard re-work.
    
            Unfortunately, since we can have 2x SalGraphics' on a
    OutputDevice,
            and one of these can be a printer - things got very confused
    around
            which context to glFlush. This de-tangles the various reference-
    counts.
    
    and then mostly removed in
        commit 33fac4828038bc38ab4a0c4b891d762a5ae73e5e
        Author: Noel Grandin <noel at peralex.com>
        Date:   Thu Dec 24 09:21:23 2015 +0200
    
            loplugin:unnecessaryvirtual
    
            and unwind some apparently now unused VCL OpenGL and
    GlyphCachePeer
            stuff.
    
    Finish the job, it's not doing anything at all anymore
    
    Change-Id: I1365c2d0652ee92630d0649b2df6e5a7b7e37e73

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 2be52c3..1811e8b 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -566,23 +566,6 @@ public:
                                     const Point& rSrcPt,  const Size& rSrcSize,
                                     bool bWindowInvalidate = false );
 
-    /**
-     * Instantiate across a paint operation to defer flushing
-     * to the end.
-     *
-     * NB. holding a handle avoids problems with
-     * the underlying SalGraphics and it's implementation
-     * changing.
-     */
-#if HAVE_FEATURE_OPENGL || defined(ANDROID)
-    class PaintScope {
-        void *pHandle;
-    public:
-        PaintScope(OutputDevice *);
-        ~PaintScope();
-        void flush();
-    };
-#endif
 protected:
 
     virtual void                CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index d904009..f713cf8 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -1072,44 +1072,4 @@ void OpenGLHelper::debugMsgPrint(const int nType, const char *pFormat, ...)
     va_end (aArgs);
 }
 
-#if HAVE_FEATURE_OPENGL || defined(ANDROID)
-
-OutputDevice::PaintScope::PaintScope(OutputDevice *pDev)
-    : pHandle( nullptr )
-{
-    if( pDev->mpGraphics || pDev->AcquireGraphics() )
-    {
-    }
-}
-
-/**
- * Flush all the queued rendering commands to the screen for this context.
- */
-void OutputDevice::PaintScope::flush()
-{
-    if( pHandle )
-    {
-        OpenGLContext *pContext = static_cast<OpenGLContext *>( pHandle );
-        pHandle = nullptr;
-        pContext->mnPainting--;
-        assert( pContext->mnPainting >= 0 );
-        if( pContext->mnPainting == 0 )
-        {
-            pContext->makeCurrent();
-            pContext->AcquireDefaultFramebuffer();
-            glFlush();
-            pContext->swapBuffers();
-            CHECK_GL_ERROR();
-        }
-        pContext->release();
-    }
-}
-
-OutputDevice::PaintScope::~PaintScope()
-{
-    flush();
-}
-
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index d441f07..cc66017 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -278,8 +278,6 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
 #if HAVE_FEATURE_OPENGL
         VCL_GL_INFO("PaintHelper::DoPaint on " <<
                     typeid( *m_pWindow ).name() << " '" << m_pWindow->GetText() << "' begin");
-
-        OutputDevice::PaintScope aScope( m_pWindow );
 #endif
         // double-buffering: setup the buffer if it does not exist
         if (!pFrameData->mbInBufferedPaint && m_pWindow->SupportsDoubleBuffering())
@@ -636,9 +634,6 @@ void Window::ImplCallOverlapPaint()
     {
         // - RTL - notify ImplCallPaint to check for re-mirroring (CHECKRTL)
         //         because we were called from the Sal layer
-#if HAVE_FEATURE_OPENGL
-        OutputDevice::PaintScope aScope( GetOutDev() );
-#endif
         ImplCallPaint(nullptr, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
     }
 }
@@ -658,10 +653,6 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void)
         return;
     }
 
-#if HAVE_FEATURE_OPENGL
-    OutputDevice::PaintScope aScope(this);
-#endif
-
     // save paint events until resizing or initial sizing done
     if (mpWindowImpl->mbFrame &&
         (mpWindowImpl->mpFrameData->maResizeIdle.IsActive() ||
@@ -679,9 +670,6 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
 {
     if( mpWindowImpl->mbReallyVisible )
     {
-#if HAVE_FEATURE_OPENGL
-        OutputDevice::PaintScope aScope(this);
-#endif
         ImplCallResize();
         if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
         {


More information about the Libreoffice-commits mailing list