diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-31 18:01:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-31 18:27:59 +0200 |
commit | 43ac95ab64980ed958ba144c33971f897791d15f (patch) | |
tree | c37e2c44d771bcd9ee5972b4f995dfd4c4d3040b | |
parent | 8b0109f28e48c8ba3fc2d77467351ec2c7b87629 (diff) |
tdf#92982 vcl rendercontext: handle empty repaint rect in PaintHelper
Empty repaint rectangle means the whole window, while Erase() is a NOP
in case of an empty rectangle.
This fixes the sidebar rendering artifacts the screenshot shows in the
bugreport.
Change-Id: I12e35ceb0aa529d65b7acf01d8cdb719101adebe
-rw-r--r-- | vcl/source/window/paint.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 9a4ca08b2518..b707a549aee5 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -114,8 +114,12 @@ void PaintHelper::StartBufferedPaint() // Instead of creating a new VirtualDevice, just erase the area we'll be // painting over, as VirtualDevice::ImplInitVirDev() would do. + // The painted area is m_aPaintRect, or in case it's empty, then the whole window. pFrameData->mpBuffer->SetBackground(Wallpaper(Color(COL_WHITE))); - pFrameData->mpBuffer->Erase(m_aPaintRect); + if (m_aPaintRect.IsEmpty()) + pFrameData->mpBuffer->Erase(Rectangle(Point(0, 0), m_pWindow->GetOutputSize())); + else + pFrameData->mpBuffer->Erase(m_aPaintRect); pFrameData->mbInBufferedPaint = true; m_bCreatedBuffer = true; |