chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:29:49 +08:00
commit 505bac6b53
1470 changed files with 457757 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Native SDK gpu-dashboard example
This example combines native app chrome, a `gpu_surface`, and a retained canvas display list:
- Native toolbar, sidebar, and statusbar controls.
- A GPU surface registered with explicit presentation settings and a dashboard display list.
- Retained widget semantics for dashboard lists, forms, data grids, popovers, and scrolling.
- A glass popover rendered with retained widget backdrop blur.
- A WebView inspector sibling in the same split layout.
- Frame diagnostics for canvas profile risk, work units, commands, batches, and dirty regions.
Run with the macOS system backend. The GPU dashboard defaults to `ReleaseFast`; pass `-Doptimize=Debug` only when debugging renderer internals.
```sh
native dev
```
Run the headless canvas and scene tests:
```sh
native test -Dplatform=null
```
+37
View File
@@ -0,0 +1,37 @@
.{
.id = "dev.native_sdk.gpu_dashboard",
.name = "gpu-dashboard",
.display_name = "GPU Dashboard",
.version = "0.1.0",
.platforms = .{"macos"},
.permissions = .{ "view", "command" },
.capabilities = .{ "native_views", "gpu_surfaces" },
.shell = .{
.windows = .{
.{
.label = "main",
.title = "Native SDK GPU Dashboard",
.width = 1240,
.height = 780,
// The floor the layout audit sweep proves clean
// (toolbar + hero rail + tiles + forecast form).
.min_width = 1080,
.min_height = 640,
.restore_state = false,
.restore_policy = "center_on_primary",
.titlebar = "hidden_inset_tall",
.views = .{
.{ .label = "dashboard-canvas", .kind = "gpu_surface", .fill = true, .min_width = 720, .role = "Native-rendered dashboard canvas", .accessibility_label = "Native-rendered product dashboard canvas", .gpu_backend = "metal", .gpu_pixel_format = "bgra8_unorm", .gpu_present_mode = "timer", .gpu_alpha_mode = "opaque", .gpu_color_space = "srgb", .gpu_vsync = true },
},
},
},
},
.security = .{
.navigation = .{
.allowed_origins = .{ "zero://app", "zero://inline" },
.external_links = .{ .action = "deny" },
},
},
.web_engine = "system",
.cef = .{ .dir = "third_party/cef/macos", .auto_install = false },
}
File diff suppressed because it is too large Load Diff