sw lok: avoid expensive DLPre/PostPaint2() around InvalidateWindows()
This shows up on profiles and it's not needed. It was only there,
because Online always needs an invalidation to have updated tiles, so
there the paint was replaced with an invalidate. And then the
drawinglayer setup/teardown was not made conditional by accident.
The PaintTile() case goes via Paint() -> PaintSwFrame(), which still
calls these functions; this commit only speeds up
SwViewShell::ImplEndAction(), which is called synchronously e.g. on
every keypress.
(cherry picked from commit
aff28c59816d046d9b74460c1b17101b99b9514e)
Change-Id: I6c362f148bc2837bd842602754770c5267e16afd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120200
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>