From e7729d12b8676528ab5bfecf58d586ac1fbafeb1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 21 Jun 2000 02:59:25 +0000 Subject: Added indentation guide API. View whitespace has setting to only see outside indentation. Indentation guide highlight. --- win32/PlatWin.cxx | 2 +- win32/ScintillaWin.cxx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index a6dfb8dd6..48fe7f7b8 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -721,7 +721,7 @@ int Platform::Maximum(int a, int b) { return b; } -//#define TRACE +#define TRACE #ifdef TRACE void Platform::DebugPrintf(const char *format, ...) { diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 829b973fa..25af77f99 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -288,7 +288,12 @@ LRESULT ScintillaWin::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case WM_PAINT: { - //CElapsed ce; ce.Begin(); + //CElapsed ce; ce.Begin(); + LARGE_INTEGER perfStart; + LARGE_INTEGER perfEnd; + LARGE_INTEGER performanceFreq; + QueryPerformanceFrequency(&performanceFreq); + QueryPerformanceCounter(&perfStart); paintState = painting; PAINTSTRUCT ps; BeginPaint(wMain.GetID(), &ps); @@ -311,7 +316,14 @@ LRESULT ScintillaWin::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { FullPaint(); } paintState = notPainting; - //Platform::DebugPrintf("Paint took %g\n", ce.End()); + QueryPerformanceCounter(&perfEnd); + __int64 start = perfStart.QuadPart; + __int64 end = perfEnd.QuadPart; + __int64 freq = performanceFreq.QuadPart; + __int64 dur = end - start; + double per = double(dur) / double(freq); + Platform::DebugPrintf("Paint took %5.03g\n", per); + //Platform::DebugPrintf("Paint took %g\n", ce.End()); } break; -- cgit v1.2.3