diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 11:35:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 11:35:30 +0200 |
commit | 6d17d6930e026aa76310767ba7013bb9e9e889b0 (patch) | |
tree | 3209140d0f8f269bf61ca68b5a091894e439d04c | |
parent | 3b48b3cc92c93911f61535d22a2c8731574ee51a (diff) |
Remove OutputDevice::PaintScope
PaintScope was introduced in
commit bfceb557efcd607ef018ae35fc73f8d61a9b9a4e
Author: Michael Meeks <michael.meeks@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@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
-rw-r--r-- | include/vcl/outdev.hxx | 17 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 40 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 12 |
3 files changed, 0 insertions, 69 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 2be52c33bf6b..1811e8b7f4e2 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 d90400997469..f713cf87e693 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 d441f076172c..cc66017d5c4d 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() ) { |