Re: asfrent - r29894 - abiword/branches/dblbuffering/src/af/gr/win

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Wed Jun 29 2011 - 19:50:26 CEST

LARGE_INTEGER is required by that Win32 API. I'd argue for using that
in platform-specific code.

On Wed, Jun 29, 2011 at 1:46 PM, J.M. Maurer <uwog@uwog.net> wrote:
>
> Just two small remarks about this commit:
>
> 1. Could you wrap all timing related stuff into an if #DEBUG block? That
> will disable it for release builds.
>
> 2. We tend to use our own integer types, so we are consistent across all
> platforms. So instead of LARGE_INTEGER, we'd use UT_sint64 .
>
> Happy hacking!
>  Marc
>
> On Tue, 2011-06-28 at 10:45 +0200, cvs@abisource.com wrote:
>> +       LARGE_INTEGER t1, t2, freq;
>> +
>> +       QueryPerformanceCounter(&t1);
>> +
>>         // copy the screen to the buffer
>>         BitBlt(m_bufferHdc, 0, 0, width, height, m_hdc, 0, 0,
>> SRCCOPY);
>> +
>> +       QueryPerformanceCounter(&t2);
>> +
>> +       QueryPerformanceFrequency(&freq);
>> +       double blitSpeed = ((double)(t2.QuadPart - t1.QuadPart)) /
>> ((double)freq.QuadPart);
>>
>> +       UT_DEBUGMSG(("ASFRENT: measured BitBlt speed: %lfs [client
>> rectangle W = %d, H = %d]\n",
>> +                       blitSpeed, width, height));
>> +
>
>

-- 
"I like to pay taxes. With them, I buy civilization." --  Oliver Wendell Holmes
Received on Wed Jun 29 19:50:38 2011

This archive was generated by hypermail 2.1.8 : Wed Jun 29 2011 - 19:50:38 CEST