vcl/headless/svpgdi.cxx | 12 ++++++------ vcl/inc/headless/svpgdi.hxx | 2 +- vcl/inc/openglgdiimpl.hxx | 2 +- vcl/inc/quartz/salgdi.h | 2 +- vcl/inc/salgdi.hxx | 4 +--- vcl/inc/salgdiimpl.hxx | 2 +- vcl/inc/unx/genpspgraphics.h | 2 +- vcl/inc/unx/salgdi.h | 2 +- vcl/inc/win/salgdi.h | 2 +- vcl/opengl/gdiimpl.cxx | 5 ++--- vcl/quartz/salgdicommon.cxx | 4 ++-- vcl/source/gdi/salgdilayout.cxx | 2 +- vcl/unx/generic/gdi/gdiimpl.cxx | 2 +- vcl/unx/generic/gdi/gdiimpl.hxx | 2 +- vcl/unx/generic/gdi/salgdi2.cxx | 4 ++-- vcl/unx/generic/print/genpspgraphics.cxx | 2 +- vcl/win/gdi/gdiimpl.cxx | 4 ++-- vcl/win/gdi/gdiimpl.hxx | 3 +-- vcl/win/gdi/salgdi2.cxx | 4 ++-- 19 files changed, 29 insertions(+), 33 deletions(-)
New commits: commit 899e8cedd7679dcd3cf26a6268a37dedcf66433d Author: Noel Grandin <[email protected]> Date: Tue May 10 11:55:49 2016 +0200 simplify SalGraphics::copyArea flags argument Change-Id: Iaaef4d90d7fe817a32cd51652d41c2e49c8909a4 Reviewed-on: https://gerrit.libreoffice.org/24832 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 2c2408b..f8a30974 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -923,12 +923,12 @@ void SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly) } void SvpSalGraphics::copyArea( long nDestX, - long nDestY, - long nSrcX, - long nSrcY, - long nSrcWidth, - long nSrcHeight, - sal_uInt16 /*nFlags*/ ) + long nDestY, + long nSrcX, + long nSrcY, + long nSrcWidth, + long nSrcHeight, + bool /*bWindowInvalidate*/ ) { SalTwoRect aTR(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight); copyBits(aTR, this); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index f93e1c7..7403143 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -188,7 +188,7 @@ public: long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + bool bWindowInvalidate) override; virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override; virtual void drawBitmap( const SalTwoRect& rPosAry, diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index 0f8b605..0bde0b6 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -281,7 +281,7 @@ public: long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 0f183ab..09dc619 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -252,7 +252,7 @@ public: // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, sal_uInt16 nFlags ) override; + long nSrcHeight, bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 11bbe91..56fe42d 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -56,8 +56,6 @@ namespace basegfx { class B2DPolyPolygon; } -#define SAL_COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001) - typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode typedef std::map< sal_Ucs, sal_Int32 > Ucs2SIntMap; typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap; @@ -497,7 +495,7 @@ protected: long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) = 0; + bool bWindowInvalidate ) = 0; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx index c5c8e6d..c2c008e 100644 --- a/vcl/inc/salgdiimpl.hxx +++ b/vcl/inc/salgdiimpl.hxx @@ -129,7 +129,7 @@ public: long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) = 0; + bool bWindowInvalidate ) = 0; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h index 1978083..b7658b9 100644 --- a/vcl/inc/unx/genpspgraphics.h +++ b/vcl/inc/unx/genpspgraphics.h @@ -168,7 +168,7 @@ public: long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + bool bWindowInvalidate) override; virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override; virtual void drawBitmap( const SalTwoRect& rPosAry, diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index cea6284..40aa91b 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -206,7 +206,7 @@ public: long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + bool bWindowInvalidate ) override; virtual void copyBits( const SalTwoRect& rPosAry, diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 4c4cbca..182f666 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -290,7 +290,7 @@ protected: // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, sal_uInt16 nFlags ) override; + long nSrcHeight, bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index b23b382..2edeaaa 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -2104,8 +2104,7 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygonBezier( void OpenGLSalGraphicsImpl::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, - sal_uInt16 /*nFlags*/ ) + long nSrcWidth, long nSrcHeight, bool /*bWindowInvalidate*/ ) { VCL_GL_INFO( "::copyArea " << nSrcX << "," << nSrcY << " >> " << nDestX << "," << nDestY << " (" << nSrcWidth << "," << nSrcHeight << ")" ); OpenGLTexture aTexture; @@ -2144,7 +2143,7 @@ void OpenGLSalGraphicsImpl::DoCopyBits( const SalTwoRect& rPosAry, OpenGLSalGrap return; // use copyArea() if source and destination context are identical copyArea( rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnSrcX, rPosAry.mnSrcY, - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, 0 ); + rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, false/*bWindowInvalidate*/ ); return; } diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 7b8fb2f..93c22b3 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -386,7 +386,7 @@ void AquaSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics *pSrcGrap } // use copyArea() if source and destination context are identical copyArea( rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnSrcX, rPosAry.mnSrcY, - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, 0 ); + rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, false/*bWindowInvalidate*/ ); return; } @@ -523,7 +523,7 @@ void AquaSalGraphics::ApplyXorContext() } void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, sal_uInt16 /*nFlags*/ ) + long nSrcWidth, long nSrcHeight, bool /*bWindowInvalidate*/ ) { SAL_WARN_IF( !mxLayer, "vcl.quartz", "AquaSalGraphics::copyArea() for non-layered graphics this=" << this ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 052edc5..450e1b0d 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -511,7 +511,7 @@ void SalGraphics::CopyArea( long nDestX, long nDestY, mirror( nDestX, nSrcWidth, pOutDev ); mirror( nSrcX, nSrcWidth, pOutDev ); } - copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, SAL_COPYAREA_WINDOWINVALIDATE ); + copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, true/*bWindowInvalidate*/ ); } void SalGraphics::CopyBits( const SalTwoRect& rPosAry, diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index b186d35..8946ed3 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -634,7 +634,7 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, void X11SalGraphicsImpl::copyArea ( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 ) + bool /*bWindowInvalidate*/) { SalTwoRect aPosAry(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight); copyBits(aPosAry, nullptr); diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 0b58543..5b04ba6 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -188,7 +188,7 @@ public: long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 2eeb49e..602c3f7 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -170,9 +170,9 @@ void X11SalGraphics::copyBits( const SalTwoRect& rPosAry, void X11SalGraphics::copyArea ( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 n ) + bool bWindowInvalidate) { - mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n ); + mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, bWindowInvalidate ); } bool X11SalGraphics::blendBitmap( const SalTwoRect& rTR, diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index b58cde1..141c141 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -492,7 +492,7 @@ void GenPspGraphics::copyBits( const SalTwoRect&, OSL_FAIL( "Error: PrinterGfx::CopyBits() not implemented" ); } -void GenPspGraphics::copyArea ( long,long,long,long,long,long,sal_uInt16 ) +void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool ) { OSL_FAIL( "Error: PrinterGfx::CopyArea() not implemented" ); } diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 87ff4e1..817b062 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -380,7 +380,7 @@ void ImplCalcOutSideRgn( const RECT& rSrcRect, void WinSalGraphicsImpl::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) + bool bWindowInvalidate ) { bool bRestoreClipRgn = false; HRGN hOldClipRgn = 0; @@ -388,7 +388,7 @@ void WinSalGraphicsImpl::copyArea( long nDestX, long nDestY, HRGN hInvalidateRgn = 0; // do we have to invalidate also the overlapping regions? - if ( (nFlags & SAL_COPYAREA_WINDOWINVALIDATE) && mrParent.isWindow() ) + if ( bWindowInvalidate && mrParent.isWindow() ) { // compute and invalidate those parts that were either off-screen or covered by other windows // while performing the above BitBlt diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx index 8f4181c..9ba7dd8 100644 --- a/vcl/win/gdi/gdiimpl.hxx +++ b/vcl/win/gdi/gdiimpl.hxx @@ -134,8 +134,7 @@ public: virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) override; + long nSrcWidth, long nSrcHeight, bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx index f8b8fe7..ae73731 100644 --- a/vcl/win/gdi/salgdi2.cxx +++ b/vcl/win/gdi/salgdi2.cxx @@ -63,10 +63,10 @@ void WinSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraph void WinSalGraphics::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - sal_uInt16 nFlags ) + bool bWindowInvalidate ) { mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, - nSrcWidth, nSrcHeight, nFlags ); + nSrcWidth, nSrcHeight, bWindowInvalidate ); } namespace _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
