1*c2c66affSColin Finck /*
2*c2c66affSColin Finck * ReactOS RosPerf - ReactOS GUI performance test program
3*c2c66affSColin Finck *
4*c2c66affSColin Finck * This program is free software; you can redistribute it and/or modify
5*c2c66affSColin Finck * it under the terms of the GNU General Public License as published by
6*c2c66affSColin Finck * the Free Software Foundation; either version 2 of the License, or
7*c2c66affSColin Finck * (at your option) any later version.
8*c2c66affSColin Finck *
9*c2c66affSColin Finck * This program is distributed in the hope that it will be useful,
10*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12*c2c66affSColin Finck * GNU General Public License for more details.
13*c2c66affSColin Finck *
14*c2c66affSColin Finck * You should have received a copy of the GNU General Public License
15*c2c66affSColin Finck * along with this program; if not, write to the Free Software
16*c2c66affSColin Finck * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17*c2c66affSColin Finck */
18*c2c66affSColin Finck
19*c2c66affSColin Finck #include <windows.h>
20*c2c66affSColin Finck #include "rosperf.h"
21*c2c66affSColin Finck
22*c2c66affSColin Finck void
FillProc(void * Context,PPERF_INFO PerfInfo,unsigned Reps)23*c2c66affSColin Finck FillProc(void *Context, PPERF_INFO PerfInfo, unsigned Reps)
24*c2c66affSColin Finck {
25*c2c66affSColin Finck unsigned Rep;
26*c2c66affSColin Finck
27*c2c66affSColin Finck for (Rep = 0; Rep < Reps; Rep++)
28*c2c66affSColin Finck {
29*c2c66affSColin Finck PatBlt((Rep & 0x100) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc, 0, 0,
30*c2c66affSColin Finck PerfInfo->WndWidth, PerfInfo->WndHeight, PATCOPY);
31*c2c66affSColin Finck }
32*c2c66affSColin Finck }
33*c2c66affSColin Finck
34*c2c66affSColin Finck void
FillSmallProc(void * Context,PPERF_INFO PerfInfo,unsigned Reps)35*c2c66affSColin Finck FillSmallProc(void *Context, PPERF_INFO PerfInfo, unsigned Reps)
36*c2c66affSColin Finck {
37*c2c66affSColin Finck #define SMALL_SIZE 16
38*c2c66affSColin Finck unsigned Rep;
39*c2c66affSColin Finck int x, y;
40*c2c66affSColin Finck
41*c2c66affSColin Finck x = 0;
42*c2c66affSColin Finck y = 0;
43*c2c66affSColin Finck
44*c2c66affSColin Finck for (Rep = 0; Rep < Reps; Rep++)
45*c2c66affSColin Finck {
46*c2c66affSColin Finck PatBlt((Rep & 0x10000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc, x, y,
47*c2c66affSColin Finck SMALL_SIZE, SMALL_SIZE, PATCOPY);
48*c2c66affSColin Finck x += SMALL_SIZE + 1;
49*c2c66affSColin Finck if (PerfInfo->WndWidth < x + SMALL_SIZE)
50*c2c66affSColin Finck {
51*c2c66affSColin Finck x = 0;
52*c2c66affSColin Finck y += SMALL_SIZE + 1;
53*c2c66affSColin Finck if (PerfInfo->WndHeight < y + SMALL_SIZE)
54*c2c66affSColin Finck {
55*c2c66affSColin Finck y = 0;
56*c2c66affSColin Finck }
57*c2c66affSColin Finck }
58*c2c66affSColin Finck }
59*c2c66affSColin Finck }
60*c2c66affSColin Finck /* EOF */
61