sd/source/ui/slidesorter/view/SlideSorterView.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit b81aa8a9930da5f93c074e7dd349c32ce49268de Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Jan 21 13:43:07 2020 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Wed Jan 22 12:04:35 2020 +0100 Unbreak code compiled conditionally with DEBUG_TIMING But it will no doubt break eventually again, and not be noticed until next time somebody wants to try to see the information that defining DEBUG_TIMING produces in this file. This kind of conditionally compiled debug code is IMHO counter-productive. It is trivial to temporarily add timing information output to any function just locally in your own build. So I am not opposed to killing this DEBUG_TIMING stuff here. Change-Id: I940e0a40cf2bd9f319c53a6ccff7a2413d1323e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87183 Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 0e87021d7155..ede6c7e5a702 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -581,7 +581,7 @@ static const size_t gFrameTimeCount (10); static size_t gFrameTimeIndex (0); static ::std::vector<double> gFrameTimes (gFrameTimeCount, 0); static double gFrameTimeSum (0); -static const Rectangle gFrameTimeBox (10,10,150,20); +static const ::tools::Rectangle gFrameTimeBox (10,10,150,20); static double gnLastFrameStart = 0; #endif @@ -593,9 +593,7 @@ void SlideSorterView::CompleteRedraw ( (void)pRedirector; #ifdef DEBUG_TIMING const double nStartTime (gaTimer.getElapsedTime()); - SAL_INFO("sd",("SlideSorterView::CompleteRedraw start at %f, %s", - nStartTime, - mnLockRedrawSmph ? "locked" : ""); + SAL_INFO("sd.timing", "SlideSorterView::CompleteRedraw start" << (mnLockRedrawSmph ? " locked" : "")); #endif if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow()) @@ -620,16 +618,16 @@ void SlideSorterView::CompleteRedraw ( #ifdef DEBUG_TIMING const double nEndTime (gaTimer.getElapsedTime()); - SAL_INFO("sd",("SlideSorterView::CompleteRedraw end at %f after %fms", nEndTime, (nEndTime-nStartTime)*1000); + SAL_INFO("sd.timing", "SlideSorterView::CompleteRedraw end after " << (nEndTime-nStartTime)*1000 << " ms"); gFrameTimeSum -= gFrameTimes[gFrameTimeIndex]; gFrameTimes[gFrameTimeIndex] = nStartTime - gnLastFrameStart; gnLastFrameStart = nStartTime; gFrameTimeSum += gFrameTimes[gFrameTimeIndex]; gFrameTimeIndex = (gFrameTimeIndex+1) % gFrameTimeCount; - mrSlideSorter.GetContentWindow()->SetFillCOL_BLUE); + mrSlideSorter.GetContentWindow()->SetFillColor(COL_BLUE); mrSlideSorter.GetContentWindow()->DrawRect(gFrameTimeBox); - mrSlideSorter.GetContentWindow()->SetTextCOL_WHITE); + mrSlideSorter.GetContentWindow()->SetTextColor(COL_WHITE); mrSlideSorter.GetContentWindow()->DrawText( gFrameTimeBox, OUString::number(1 / (gFrameTimeSum / gFrameTimeCount)), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits