93 if (lastFrameTime > 0f
95 && lastCpuFrameTime > 0f
96 && lastCpuFrameTime < 1f) {
117 float num = (int)Math.Round(
120 float num2 = (int)Math.Round(
123 Log.
Information($
"PerformanceManager Measurement: frames={m_frameCount}, avgFrameTime={num}ms, avgFrameCpuTime={num2}ms");
154 $
"CPUMEM {TotalMemoryUsed / 1024f / 1024f:0}MB, GPUMEM {TotalGpuMemoryUsed / 1024f / 1024f:0}MB({TotalGraphicResourcesCount}), CPU {AverageCpuFrameTime / AverageFrameTime * 100f:0}%, {1f / AverageFrameTime:0.0} FPS";
156 string wname = ScreensManager.RootWidget.Input.MousePosition.HasValue
162 StringBuilder stringBuilder =
new();
168 stringBuilder.ToString(),
179 float num = viewport.Width / scale.X > 480f ? scale.X * 2f : scale.
X;
180 float num2 = viewport.Height / -0.1f;
181 float num3 = viewport.Height - 1;
192 Color color = Color.Orange * s;
193 Color color2 = Color.Red * s;
194 for (
int num5 =
m_frameData.Length - 1; num5 >= 0; num5--) {
197 float x = num5 * num;
198 float x2 = (num5 + 1) * num;
208 new Vector2(0f, num3 + 0.0166666675f * num2),
209 new Vector2(viewport.
Width, num3 + 0.0166666675f * num2),
static long GetGpuMemoryUsage()
void QueueQuad(Vector2 corner1, Vector2 corner2, float depth, Color color)
void QueueLine(Vector2 p1, Vector2 p2, float depth, Color color)
static HashSet< GraphicsResource > m_resources
static SamplerState PointClamp
static void Information(object message)
static int Max(int x1, int x2)
static float FrameDuration
static bool PeriodicEvent(double period, double offset)
static Vector4 DisplayCutoutInsets
刘海/水滴/挖孔在屏幕边缘的宽度。X: 左边,Y: 顶部,Z: 右边,W: 底部
static float LastFrameTime
static float LastCpuFrameTime
static ContainerWidget RootWidget
static Screen CurrentScreen
static bool DisplayFpsRibbon
static bool DisplayFpsCounter
static readonly Vector2 Zero
static Vector2 Transform(Vector2 v, Matrix m)