summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-01-21 13:43:07 +0200
committerTor Lillqvist <tml@collabora.com>2020-01-24 00:17:20 +0100
commit07b1159b79135857dd9a450c3bb9ae0a944ebcf9 (patch)
tree32439a717ab0ce71df33147e7b5af23ce50b2901 /sd
parent7c613d8f1bd9cb274a0e93ab959dc30f303b3cf8 (diff)
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 <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit b81aa8a9930da5f93c074e7dd349c32ce49268de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87255 Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index a8e6093961c1..f275e6631156 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -561,7 +561,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
@@ -573,9 +573,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())
@@ -600,16 +598,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)),