статистика времени кадра

This commit is contained in:
2026-03-01 17:19:52 +03:00
parent 8ca31bf479
commit 9fa13fa913
8 changed files with 98 additions and 29 deletions

View File

@@ -175,6 +175,7 @@ pub fn leftPanel(ctx: *WindowContext) void {
if (dvui.checkbox(@src(), &canvas.draw_document, "Draw document", .{})) {
canvas.requestRedraw();
}
if (dvui.checkbox(@src(), &canvas.show_render_stats, "Show stats", .{})) {}
if (!canvas.draw_document) {
if (dvui.button(@src(), if (doc.cpu_render.type == .Gradient) "Gradient" else "Squares", .{}, .{})) {
if (doc.cpu_render.type == .Gradient) {
@@ -188,6 +189,9 @@ pub fn leftPanel(ctx: *WindowContext) void {
if (dvui.button(@src(), "Add random shapes", .{}, .{})) {
canvas.addRandomShapes() catch {};
}
if (dvui.button(@src(), "Request redraw", .{}, .{})) {
canvas.requestRedraw();
}
} else {
dvui.label(@src(), "No document", .{}, .{});
}