29 static HWND GpuDialog;
31 static RECT GpuGraphMargin;
32 static HWND GpuGraphHandle;
34 static HWND DedicatedGraphHandle;
36 static HWND SharedGraphHandle;
51 GpuSection = Pointers->CreateSection(§ion);
57 _In_opt_ PVOID Parameter1,
58 _In_opt_ PVOID Parameter2
94 Section->Parameters->ColorSetupFunction(drawInfo,
PhGetIntegerSetting(L
"ColorCpuKernel"), 0);
97 if (!Section->GraphState.Valid)
100 Section->GraphState.Valid =
TRUE;
117 getTooltipText->
Text = Section->GraphState.TooltipText->sr;
179 GpuGraphMargin = graphItem->
Margin;
188 ShowWindow(GpuPanel, SW_SHOW);
209 NMHDR *header = (NMHDR *)lParam;
211 if (header->hwndFrom == GpuGraphHandle)
215 else if (header->hwndFrom == DedicatedGraphHandle)
219 else if (header->hwndFrom == SharedGraphHandle)
241 switch (LOWORD(wParam))
258 GpuGraphHandle = CreateWindow(
261 WS_VISIBLE | WS_CHILD | WS_BORDER,
273 DedicatedGraphHandle = CreateWindow(
276 WS_VISIBLE | WS_CHILD | WS_BORDER,
288 SharedGraphHandle = CreateWindow(
291 WS_VISIBLE | WS_CHILD | WS_BORDER,
315 GetClientRect(GpuDialog, &clientRect);
316 GetClientRect(GetDlgItem(GpuDialog,
IDC_GPU_L), &labelRect);
317 graphWidth = clientRect.right - GpuGraphMargin.left - GpuGraphMargin.right;
318 graphHeight = (clientRect.bottom - GpuGraphMargin.top - GpuGraphMargin.bottom - labelRect.bottom * 3 -
ET_GPU_PADDING * 5) / 3;
320 deferHandle = BeginDeferWindowPos(6);
321 y = GpuGraphMargin.top;
323 deferHandle = DeferWindowPos(
331 SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER
335 deferHandle = DeferWindowPos(
343 SWP_NOACTIVATE | SWP_NOZORDER
347 deferHandle = DeferWindowPos(
355 SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER
359 deferHandle = DeferWindowPos(
361 DedicatedGraphHandle,
367 SWP_NOACTIVATE | SWP_NOZORDER
371 deferHandle = DeferWindowPos(
379 SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER
383 deferHandle = DeferWindowPos(
390 clientRect.bottom - GpuGraphMargin.bottom - y,
391 SWP_NOACTIVATE | SWP_NOZORDER
394 EndDeferWindowPos(deferHandle);
401 switch (Header->code)
417 if (!GpuGraphState.
Valid)
474 switch (Header->code)
486 &DedicatedGraphState,
491 if (!DedicatedGraphState.
Valid)
495 DedicatedGraphState.
Data1[i] =
503 DedicatedGraphState.
Data1,
526 L
"Dedicated Memory: %s\n%s",
543 switch (Header->code)
560 if (!SharedGraphState.
Valid)
564 SharedGraphState.
Data1[i] =
572 SharedGraphState.
Data1,
595 L
"Shared Memory: %s\n%s",
617 InvalidateRect(GpuGraphHandle, NULL,
FALSE);
624 InvalidateRect(DedicatedGraphHandle, NULL,
FALSE);
631 InvalidateRect(SharedGraphHandle, NULL,
FALSE);
676 L
"\n%s (%lu): %.2f%%",
678 HandleToUlong(maxProcessRecord->
ProcessId),
685 return maxUsageString;
699 for (i = 0; i < count; i++)
709 if (count == 1 || !
PhEqualString2(description, L
"Microsoft Basic Render Driver",
TRUE))