summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-01 14:55:35 +0200
committerNoel Grandin <noel@peralex.com>2015-12-02 08:47:30 +0200
commit7e9bdfe60784d49ab7d6ffe8df256834d39e1234 (patch)
tree3a1ffb6a8a0c8c10f12f425dee4c31fe67578800
parent947cc1b53a5c87431202811e231cbfad790c6e68 (diff)
small optimisation in paint
no need to instantiate PaintHelper unless we are going to use it Change-Id: I911f5f49ab566b33114a092823b89f91f4ab297a
-rw-r--r--vcl/source/window/paint.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 6402639c6f47..c1722d270b0a 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -601,10 +601,11 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, sal_uInt16 nPaintFlags)
nPaintFlags = mpWindowImpl->mnPaintFlags & ~(IMPL_PAINT_PAINT);
- PaintHelper aHelper(this, nPaintFlags);
-
if (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT)
+ {
+ PaintHelper aHelper(this, nPaintFlags);
aHelper.DoPaint(pRegion);
+ }
else
mpWindowImpl->mnPaintFlags = 0;
}