From bbafd80e0bbcaf3e61962d062070f6ec8c1c8b88 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 16 Oct 2015 09:45:52 +0200 Subject: [PATCH 213/398] editeng tiled rendering: avoid selections callbacks in Paint() Given that we emit selection callbacks on each logical operations (set selection, deselect all, etc) already, it's not necessary to emit callbacks in DrawSelection() when it's called from Paint(). Change-Id: I6781c71ee2f292de2a1c7d129fc49b514aca2be1 (cherry picked from commit 11754fd7923c727e921bb6cbaf88d2765082667c) --- editeng/source/editeng/impedit3.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 5df7e5e0ad32..3e4bceee6da9 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3848,7 +3848,10 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev else pTarget->SetClipRegion(); - pView->DrawSelection(pView->GetEditSelection(), 0, pTarget); + // In case of tiled rendering pass a region to DrawSelection(), so that + // selection callbacks are not emitted during every repaint. + vcl::Region aRegion; + pView->DrawSelection(pView->GetEditSelection(), pView->isTiledRendering() ? &aRegion : 0, pTarget); } } -- 2.12.0