summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-10 11:55:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-12 07:13:45 +0000
commit899e8cedd7679dcd3cf26a6268a37dedcf66433d (patch)
tree5e26e6f27a3e7be276612901575faa1d3902cbf4
parentb415494bf0468b74318b61f114e2ff4ae68c00ee (diff)
simplify SalGraphics::copyArea flags argument
Change-Id: Iaaef4d90d7fe817a32cd51652d41c2e49c8909a4 Reviewed-on: https://gerrit.libreoffice.org/24832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--vcl/headless/svpgdi.cxx12
-rw-r--r--vcl/inc/headless/svpgdi.hxx2
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/inc/quartz/salgdi.h2
-rw-r--r--vcl/inc/salgdi.hxx4
-rw-r--r--vcl/inc/salgdiimpl.hxx2
-rw-r--r--vcl/inc/unx/genpspgraphics.h2
-rw-r--r--vcl/inc/unx/salgdi.h2
-rw-r--r--vcl/inc/win/salgdi.h2
-rw-r--r--vcl/opengl/gdiimpl.cxx5
-rw-r--r--vcl/quartz/salgdicommon.cxx4
-rw-r--r--vcl/source/gdi/salgdilayout.cxx2
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx2
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.hxx2
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx4
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx2
-rw-r--r--vcl/win/gdi/gdiimpl.cxx4
-rw-r--r--vcl/win/gdi/gdiimpl.hxx3
-rw-r--r--vcl/win/gdi/salgdi2.cxx4
19 files changed, 29 insertions, 33 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2c2408bec8c9..f8a30974b5dc 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 f93e1c7317f4..7403143b2c6d 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 0f8b605b5fca..0bde0b65bffd 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 0f183ab53968..09dc6193148b 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 11bbe91d3dc5..56fe42dbfe38 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 c5c8e6d42178..c2c008e68462 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 19780831923d..b7658b93f3dd 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 cea628436be7..40aa91b6ac70 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 4c4cbca8e85f..182f666855f8 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 b23b382ad5eb..2edeaaa5c17f 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 7b8fb2f220d8..93c22b3c98c8 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 052edc564845..450e1b0d6ebe 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 b186d3507369..8946ed3d128a 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 0b58543c71fa..5b04ba67be0c 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 2eeb49eec324..602c3f7294a2 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 b58cde148989..141c14154ee0 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 87ff4e1b4b21..817b062b34a7 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 8f4181c5a2db..9ba7dd8bf7fe 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 f8b8fe75f92b..ae7373160b6a 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