summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-08-13 18:12:37 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-08-14 01:00:04 +0200
commitbf021c369f2306ee507da9bd3cc4cd10ac5d234c (patch)
treea3dc2552801cfe31cb524c6f375980eaa48e844b /vcl/source/outdev
parent56d5531373cf0588e02c254ea8ffa00221c8342b (diff)
tdf#135500: always use transparent and clear content vdev in impBufferDevice
This removes the only place that hadn't used transparent impBufferDevice yet - in VclProcessor2D::RenderMaskPrimitive2DPixel. Not clearing the vdev made it draw on whatever garbage was left there from previous paints when the buffer was taken from maFreeBuffers in VDevBuffer::alloc, so since this was also the only place left that didn't clear the buffer explicitly, this makes the clear unconditional in impBufferDevice ctor. Also this makes sure to clear proper rectangle in VDevBuffer::alloc, and to clear mpAlphaVDev in OutputDevice::Erase. Change-Id: I7c1c0cc510a92628f19020b3faf0c0cd81f5a599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100674 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/wallpaper.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index ae3687d79f35..594fdbe05c9b 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -119,6 +119,19 @@ void OutputDevice::Erase()
mpAlphaVDev->Erase();
}
+void OutputDevice::Erase(const tools::Rectangle& rRect)
+{
+ const RasterOp eRasterOp = GetRasterOp();
+ if ( eRasterOp != RasterOp::OverPaint )
+ SetRasterOp( RasterOp::OverPaint );
+ DrawWallpaper(rRect, GetBackground());
+ if ( eRasterOp != RasterOp::OverPaint )
+ SetRasterOp( eRasterOp );
+
+ if (mpAlphaVDev)
+ mpAlphaVDev->Erase(rRect);
+}
+
void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )