diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-09-16 09:17:37 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-16 09:50:43 +0000 |
commit | bfceb557efcd607ef018ae35fc73f8d61a9b9a4e (patch) | |
tree | 7f46254e93f12bc3b96cb49fa52afa97a855c2e3 /include/vcl | |
parent | 4af40495b7dcdac3add67c634dde75c896e370d9 (diff) |
GL paint-flushing guard re-work.
Unfortunately, since we can have 2x SalGraphics' on a OutputDevice,
and one of these can be a printer - things got very confused around
which context to glFlush. This de-tangles the various reference-counts.
Change-Id: I1062be0b02a91fc9009deaa3ec29c5dbb227df20
Reviewed-on: https://gerrit.libreoffice.org/18604
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/outdev.hxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index c8ba06a112fe..20bd81ae197f 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -606,9 +606,21 @@ public: const Point& rSrcPt, const Size& rSrcSize, bool bWindowInvalidate = false ); - // Call before and after a paint operation to reduce flushing - void BeginPaint(); - void EndPaint(); + /** + * Instantiate across a paint operation to defer flushing + * to the end. + * + * NB. holding a handle avoids problems with + * the underlying SalGraphics and it's implementation + * changing. + */ + class PaintScope { + void *pHandle; + public: + PaintScope(OutputDevice *); + ~PaintScope(); + void flush(); + }; protected: |