ReactOS  0.4.13-dev-982-g9853eab
rosperf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagPERF_INFO
 
struct  tagTEST
 

Typedefs

typedef struct tagPERF_INFO PERF_INFO
 
typedef struct tagPERF_INFOPPERF_INFO
 
typedef unsigned(* INITTESTPROC) (void **Context, PPERF_INFO PerfInfo, unsigned Reps)
 
typedef void(* TESTPROC) (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
typedef void(* CLEANUPTESTPROC) (void *Context, PPERF_INFO PerfInfo)
 
typedef struct tagTEST TEST
 
typedef struct tagTESTPTEST
 

Functions

void GetTests (unsigned *TestCount, PTEST *Tests)
 
unsigned NullInit (void **Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void NullCleanup (void *Context, PPERF_INFO PerfInfo)
 
void FillProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void FillSmallProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void LinesHorizontalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void LinesVerticalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void LinesProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void TextProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
unsigned AlphaBlendInit (void **Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void AlphaBlendCleanup (void *Context, PPERF_INFO PerfInfo)
 
void AlphaBlendProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void GradientHorizontalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void GradientVerticalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void GradientProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void ScrollProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 

Typedef Documentation

◆ CLEANUPTESTPROC

typedef void(* CLEANUPTESTPROC) (void *Context, PPERF_INFO PerfInfo)

Definition at line 37 of file rosperf.h.

◆ INITTESTPROC

typedef unsigned(* INITTESTPROC) (void **Context, PPERF_INFO PerfInfo, unsigned Reps)

Definition at line 35 of file rosperf.h.

◆ PERF_INFO

◆ PPERF_INFO

◆ PTEST

typedef struct tagTEST * PTEST

◆ TEST

typedef struct tagTEST TEST

◆ TESTPROC

typedef void(* TESTPROC) (void *Context, PPERF_INFO PerfInfo, unsigned Reps)

Definition at line 36 of file rosperf.h.

Function Documentation

◆ AlphaBlendCleanup()

void AlphaBlendCleanup ( void Context,
PPERF_INFO  PerfInfo 
)

Definition at line 52 of file alphablend.c.

53 {
55  DeleteDC(ctx->BitmapDc);
56  DeleteObject(ctx->Bitmap);
57  HeapFree(GetProcessHeap(), 0, ctx);
58 }
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define GetProcessHeap()
Definition: compat.h:395
BOOL WINAPI DeleteDC(_In_ HDC)
struct tagContext Context
Definition: acpixf.h:1012
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ AlphaBlendInit()

unsigned AlphaBlendInit ( void **  Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 29 of file alphablend.c.

30 {
32  INT x, y;
33 
34  ctx->BitmapDc = CreateCompatibleDC(PerfInfo->BackgroundDc);
35  ctx->Bitmap = CreateCompatibleBitmap(PerfInfo->BackgroundDc, PerfInfo->WndWidth, PerfInfo->WndHeight);
36  SelectObject(ctx->BitmapDc, ctx->Bitmap);
37 
38  for (y = 0; y < PerfInfo->WndHeight; y++)
39  {
40  for (x = 0; x < PerfInfo->WndWidth; x++)
41  {
42  SetPixel(ctx->BitmapDc, x, y, RGB(0xff, 0x00, 0x00));
43  }
44  }
45 
46  *Context = ctx;
47 
48  return Reps;
49 }
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
int32_t INT
Definition: typedefs.h:56
FORCEINLINE VOID SetPixel(IN ULONG Left, IN ULONG Top, IN UCHAR Color)
Definition: vga.c:93
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define RGB(r, g, b)
Definition: wingdi.h:2925
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
INT WndWidth
Definition: rosperf.h:31

◆ AlphaBlendProc()

void AlphaBlendProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 67 of file alphablend.c.

68 {
70  unsigned Rep;
71  BLENDFUNCTION BlendFunc = { AC_SRC_OVER, 0, 0, 0 };
72 
73  for (Rep = 0; Rep < Reps; Rep++)
74  {
75  BlendFunc.SourceConstantAlpha = 255 * Rep / Reps;
76 #if 0
77  PatBlt(PerfInfo->BackgroundDc, 0, 0, PerfInfo->WndWidth, PerfInfo->WndHeight, PATCOPY);
78 #endif
79  if (!AlphaBlend(PerfInfo->BackgroundDc, 0, 0, PerfInfo->WndWidth, PerfInfo->WndHeight,
80  ctx->BitmapDc, 0, 0, PerfInfo->WndWidth, PerfInfo->WndHeight,
81  BlendFunc))
82  {
83  DbgPrint("AlphaBlend failed (0x%lx)\n", GetLastError());
84  }
85  }
86 }
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
ULONG DbgPrint(IN PCSTR Format, IN ...)
BYTE SourceConstantAlpha
Definition: wingdi.h:2746
#define AC_SRC_OVER
Definition: wingdi.h:1358
#define PATCOPY
Definition: wingdi.h:334
#define AlphaBlend
Definition: misc.c:293
struct tagContext Context
Definition: acpixf.h:1012
BLENDFUNCTION BlendFunc
Definition: general.c:32
INT WndWidth
Definition: rosperf.h:31

◆ FillProc()

void FillProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 23 of file fill.c.

24 {
25  unsigned Rep;
26 
27  for (Rep = 0; Rep < Reps; Rep++)
28  {
29  PatBlt((Rep & 0x100) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc, 0, 0,
30  PerfInfo->WndWidth, PerfInfo->WndHeight, PATCOPY);
31  }
32 }
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define PATCOPY
Definition: wingdi.h:334
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31

◆ FillSmallProc()

void FillSmallProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 35 of file fill.c.

36 {
37 #define SMALL_SIZE 16
38  unsigned Rep;
39  int x, y;
40 
41  x = 0;
42  y = 0;
43 
44  for (Rep = 0; Rep < Reps; Rep++)
45  {
46  PatBlt((Rep & 0x10000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc, x, y,
48  x += SMALL_SIZE + 1;
49  if (PerfInfo->WndWidth < x + SMALL_SIZE)
50  {
51  x = 0;
52  y += SMALL_SIZE + 1;
53  if (PerfInfo->WndHeight < y + SMALL_SIZE)
54  {
55  y = 0;
56  }
57  }
58  }
59 }
#define SMALL_SIZE
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define PATCOPY
Definition: wingdi.h:334
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31

◆ GetTests()

void GetTests ( unsigned *  TestCount,
PTEST Tests 
)

Definition at line 39 of file testlist.c.

40  {
41  *TestCount = sizeof(TestList) / sizeof(TEST);
42  *Tests = TestList;
43  }
Definition: comm.c:64
static TEST TestList[]
Definition: testlist.c:22
struct test_data Tests[]

Referenced by ProcessCommandLine().

◆ GradientHorizontalProc()

void GradientHorizontalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 97 of file gradient.c.

98 {
99  unsigned Rep;
100  HDC Dc;
101  TRIVERTEX vert[2];
102  static GRADIENT_RECT gcap = {0, 1};
103 
104  Dc = PerfInfo->ForegroundDc;
105  for (Rep = 0; Rep < Reps; Rep++)
106  {
107  vert[0].x = 0;
108  vert[0].y = 0;
109  vert[0].Red = 0xff00;
110  vert[0].Green = 0xff00 - 0xff00 * Rep / Reps;
111  vert[0].Blue = 0xff00 * Rep / Reps;
112  vert[0].Alpha = 0;
113 
114  vert[1].x = PerfInfo->WndWidth;
115  vert[1].y = PerfInfo->WndHeight;
116  vert[1].Red = 0xff00 - 0xff00 * Rep / Reps;
117  vert[1].Green = 0xff00 * Rep / Reps;
118  vert[1].Blue = 0xff00;
119  vert[1].Alpha = 0;
120 
121  GradientFill(Dc, vert, 2, &gcap, 1, GRADIENT_FILL_RECT_H);
122  }
123 }
static HDC
Definition: imagelist.c:92
INT WndHeight
Definition: rosperf.h:32
LONG y
Definition: wingdi.h:2770
LONG x
Definition: wingdi.h:2769
COLOR16 Alpha
Definition: wingdi.h:2774
COLOR16 Red
Definition: wingdi.h:2771
HDC ForegroundDc
Definition: rosperf.h:29
COLOR16 Blue
Definition: wingdi.h:2773
COLOR16 Green
Definition: wingdi.h:2772
INT WndWidth
Definition: rosperf.h:31

◆ GradientProc()

void GradientProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 25 of file gradient.c.

26 {
27  unsigned Rep;
28  HDC Dc;
29  TRIVERTEX vert[6];
30  static GRADIENT_TRIANGLE gcap[4];
31 
32  Dc = PerfInfo->ForegroundDc;
33  vert[0].x = 0;
34  vert[0].y = 0;
35  vert[0].Red = 0xff00;
36  vert[0].Green = 0;
37  vert[0].Blue = 0;
38  vert[0].Alpha = 0;
39  vert[1].x = PerfInfo->WndWidth;
40  vert[1].y = 0;
41  vert[1].Red = 0;
42  vert[1].Green = 0xff00;
43  vert[1].Blue = 0;
44  vert[1].Alpha = 0;
45  vert[2].x = PerfInfo->WndWidth;
46  vert[2].y = PerfInfo->WndHeight;
47  vert[2].Red = 0;
48  vert[2].Green = 0;
49  vert[2].Blue = 0xff00;
50  vert[2].Alpha = 0;
51  vert[3].x = 0;
52  vert[3].y = PerfInfo->WndHeight;
53  vert[3].Red = 0;
54  vert[3].Green = 0xff00;
55  vert[3].Blue = 0;
56  vert[3].Alpha = 0;
57  vert[4].Red = 0;
58  vert[4].Green = 0;
59  vert[4].Blue = 0;
60  vert[4].Alpha = 0;
61  vert[5].Red = 0;
62  vert[5].Green = 0;
63  vert[5].Blue = 0;
64  vert[5].Alpha = 0;
65 
66  for (Rep = 0; Rep < Reps; Rep++)
67  {
68  switch (2 * Rep / Reps)
69  {
70  case 0:
71  vert[4].x = PerfInfo->WndWidth * 2 * Rep / Reps;
72  vert[4].y = 0;
73  vert[5].x = PerfInfo->WndWidth - vert[4].x;
74  vert[5].y = PerfInfo->WndHeight;
75  gcap[0].Vertex1 = 5; gcap[0].Vertex2 = 0; gcap[0].Vertex3 = 4;
76  gcap[1].Vertex1 = 5; gcap[1].Vertex2 = 4; gcap[1].Vertex3 = 1;
77  gcap[2].Vertex1 = 5; gcap[2].Vertex2 = 1; gcap[2].Vertex3 = 2;
78  gcap[3].Vertex1 = 5; gcap[3].Vertex2 = 3; gcap[3].Vertex3 = 0;
79  break;
80  case 1:
81  vert[4].x = PerfInfo->WndWidth;
82  vert[4].y = PerfInfo->WndHeight * 2 * Rep / Reps - PerfInfo->WndHeight;
83  vert[5].x = 0;
84  vert[5].y = PerfInfo->WndHeight - vert[4].y;
85  gcap[0].Vertex1 = 5; gcap[0].Vertex2 = 1; gcap[0].Vertex3 = 4;
86  gcap[1].Vertex1 = 5; gcap[1].Vertex2 = 4; gcap[1].Vertex3 = 2;
87  gcap[2].Vertex1 = 5; gcap[2].Vertex2 = 2; gcap[2].Vertex3 = 3;
88  gcap[3].Vertex1 = 5; gcap[3].Vertex2 = 0; gcap[3].Vertex3 = 1;
89  break;
90  }
91 
92  GradientFill(Dc, vert, 6, &gcap, 4, GRADIENT_FILL_TRIANGLE);
93  }
94 }
static HDC
Definition: imagelist.c:92
INT WndHeight
Definition: rosperf.h:32
LONG y
Definition: wingdi.h:2770
LONG x
Definition: wingdi.h:2769
COLOR16 Alpha
Definition: wingdi.h:2774
COLOR16 Red
Definition: wingdi.h:2771
HDC ForegroundDc
Definition: rosperf.h:29
COLOR16 Blue
Definition: wingdi.h:2773
COLOR16 Green
Definition: wingdi.h:2772
INT WndWidth
Definition: rosperf.h:31

◆ GradientVerticalProc()

void GradientVerticalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 126 of file gradient.c.

127 {
128  unsigned Rep;
129  HDC Dc;
130  TRIVERTEX vert[2];
131  static GRADIENT_RECT gcap = {0, 1};
132 
133  Dc = PerfInfo->ForegroundDc;
134  for (Rep = 0; Rep < Reps; Rep++)
135  {
136  vert[0].x = 0;
137  vert[0].y = 0;
138  vert[0].Red = 0xff00 * Rep / Reps;
139  vert[0].Green = 0xff00 - 0xff00 * Rep / Reps;
140  vert[0].Blue = 0xff00;
141  vert[0].Alpha = 0;
142 
143  vert[1].x = PerfInfo->WndWidth;
144  vert[1].y = PerfInfo->WndHeight;
145  vert[1].Red = 0xff00 - 0xff00 * Rep / Reps;
146  vert[1].Green = 0xff00;
147  vert[1].Blue = 0xff00 * Rep / Reps;
148  vert[1].Alpha = 0;
149 
150  GradientFill(Dc, vert, 2, &gcap, 1, GRADIENT_FILL_RECT_V);
151  }
152 }
static HDC
Definition: imagelist.c:92
INT WndHeight
Definition: rosperf.h:32
LONG y
Definition: wingdi.h:2770
LONG x
Definition: wingdi.h:2769
COLOR16 Alpha
Definition: wingdi.h:2774
COLOR16 Red
Definition: wingdi.h:2771
HDC ForegroundDc
Definition: rosperf.h:29
COLOR16 Blue
Definition: wingdi.h:2773
COLOR16 Green
Definition: wingdi.h:2772
INT WndWidth
Definition: rosperf.h:31

◆ LinesHorizontalProc()

void LinesHorizontalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 60 of file lines.c.

61 {
62  unsigned Rep;
63  int y;
64  HDC Dc;
65 
66  for (Rep = 0; Rep < Reps; )
67  {
68  Dc = (Rep & 0x10000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
69 
70  for (y = 0; y < PerfInfo->WndHeight && Rep < Reps; Rep++, y += 3)
71  {
72  MoveToEx(Dc, 0, y, NULL);
73  LineTo(Dc, PerfInfo->WndWidth, y);
74  }
75  }
76 }
static HDC
Definition: imagelist.c:92
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
smooth NULL
Definition: ftsmooth.c:416
#define for
Definition: utility.h:88
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31

◆ LinesProc()

void LinesProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 23 of file lines.c.

24 {
25  unsigned Rep;
26  int Dest;
27  HDC Dc;
28 
29  for (Rep = 0; Rep < Reps; )
30  {
31  Dc = (Rep & 0x1000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
32 
33  for (Dest = 2; Dest < PerfInfo->WndHeight && Rep < Reps; Rep++, Dest += 2)
34  {
35  MoveToEx(Dc, 0, 0, NULL);
36  LineTo(Dc, PerfInfo->WndWidth, Dest);
37  }
38 
39  for (Dest = PerfInfo->WndWidth - 2; 0 <= Dest && Rep < Reps; Rep++, Dest -= 2)
40  {
41  MoveToEx(Dc, PerfInfo->WndWidth, 0, NULL);
42  LineTo(Dc, Dest, PerfInfo->WndHeight);
43  }
44 
45  for (Dest = PerfInfo->WndHeight - 2; 0 <= Dest && Rep < Reps; Rep++, Dest -= 2)
46  {
47  MoveToEx(Dc, PerfInfo->WndWidth, PerfInfo->WndHeight, NULL);
48  LineTo(Dc, 0, Dest);
49  }
50 
51  for (Dest = 2; Dest < PerfInfo->WndWidth && Rep < Reps; Rep++, Dest += 2)
52  {
53  MoveToEx(Dc, 0, PerfInfo->WndHeight, NULL);
54  LineTo(Dc, Dest, 0);
55  }
56  }
57 }
static HDC
Definition: imagelist.c:92
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
smooth NULL
Definition: ftsmooth.c:416
#define for
Definition: utility.h:88
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31

◆ LinesVerticalProc()

void LinesVerticalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 79 of file lines.c.

80 {
81  unsigned Rep;
82  int x;
83  HDC Dc;
84 
85  for (Rep = 0; Rep < Reps; )
86  {
87  Dc = (Rep & 0x1000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
88 
89  for (x = 0; x < PerfInfo->WndWidth && Rep < Reps; Rep++, x += 3)
90  {
91  MoveToEx(Dc, x, 0, NULL);
92  LineTo(Dc, x, PerfInfo->WndHeight);
93  }
94  }
95 }
static HDC
Definition: imagelist.c:92
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
smooth NULL
Definition: ftsmooth.c:416
#define for
Definition: utility.h:88
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31

◆ NullCleanup()

void NullCleanup ( void Context,
PPERF_INFO  PerfInfo 
)

Definition at line 64 of file rosperf.c.

65 {
66 }

◆ NullInit()

unsigned NullInit ( void **  Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 56 of file rosperf.c.

57 {
58  *Context = NULL;
59 
60  return Reps;
61 }
smooth NULL
Definition: ftsmooth.c:416

◆ ScrollProc()

void ScrollProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 23 of file scroll.c.

24 {
25  unsigned Rep;
26  RECT rect;
27  int x = 0, y = 0, dx = 1, dy = 1;
28 
29  rect.left = rect.top = 0;
30  rect.right = PerfInfo->WndWidth;
31  rect.bottom = PerfInfo->WndHeight;
32 
33  DrawTextW(PerfInfo->ForegroundDc, L"rosperf", -1, &rect, DT_LEFT | DT_TOP);
34 
35  for (Rep = 0; Rep < Reps; Rep++)
36  {
37  ScrollDC((Rep & 0x100) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc,
38  dx, dy, NULL, NULL, NULL, NULL);
39  x += dx;
40  y += dy;
41  if ((x >= PerfInfo->WndWidth -50) || x == 0) dx = -dx;
42  if ((y >= PerfInfo->WndHeight -10) || y == 0) dy = -dy;
43  }
44 
45 }
GLint dy
Definition: linetemp.h:97
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
& rect
Definition: startmenu.cpp:1413
#define DT_LEFT
Definition: winuser.h:534
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI ScrollDC(_In_ HDC, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT)
static const WCHAR L[]
Definition: oid.c:1250
#define DT_TOP
Definition: winuser.h:542
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
HDC ForegroundDc
Definition: rosperf.h:29
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17
INT WndWidth
Definition: rosperf.h:31

◆ TextProc()

void TextProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 23 of file text.c.

24 {
25  unsigned Rep;
26  int y;
27  HDC Dc = NULL;
29 
30  for (Rep = 0; Rep < Reps; )
31  {
32  Dc = (Rep & 0x10000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
33  SelectObject(Dc, hfFont);
34 
35  for (y = 0; y < PerfInfo->WndHeight && Rep < Reps; Rep++, y += 15)
36  {
37  TextOut(Dc, 0, y, L"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz:?<>0123456789", 66);
38  }
39  InvalidateRect(PerfInfo->Wnd, NULL, TRUE);
40  UpdateWindow(PerfInfo->Wnd);
41  }
42 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define TRUE
Definition: types.h:120
HWND Wnd
Definition: rosperf.h:24
static HDC
Definition: imagelist.c:92
BOOL WINAPI UpdateWindow(_In_ HWND)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
HDC BackgroundDc
Definition: rosperf.h:30
INT WndHeight
Definition: rosperf.h:32
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
static const WCHAR L[]
Definition: oid.c:1250
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
HDC ForegroundDc
Definition: rosperf.h:29
#define TextOut
Definition: wingdi.h:4468