summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-08-07 16:35:11 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-08-07 16:35:23 +0200
commitc64a7ce1fcd1e30956a77530d0b76ad493841024 (patch)
tree723796de700b511614ffeb9c36b12284fa5d3255 /vcl/source/outdev
parenta6c7a0bf105c399d087e2d9f843dbd9b175fdf42 (diff)
Resolves: tdf#92982 vcl rendercontext: handle buffered paint of vcl::Cursor
Instead of painting on the vcl::Window directly, take a PaintBufferGuard, and use the vcl::RenderContext of it, that may be either the vcl::Window or the toplevel frame's buffer. Trigger the paint of the buffer by informing the guard what area was painted. In case of direct painting, both the ctor and the dtor of the guard is a NOP. This means that finally we can also assert Invert() calls on the output device, so that direct paint can't happen when double-buffering. Change-Id: I0322563369dc63b3c49061cbe7c4a911cb13a2e2
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/rect.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index d786649c0cb4..e8ecf440de50 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -131,6 +131,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags )
{
+ assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() )
return;
@@ -163,6 +164,7 @@ void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags )
void OutputDevice::Invert( const Polygon& rPoly, InvertFlags nFlags )
{
+ assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() )
return;