Squash of 27 work commits (Sep 3–12):aa907caplatform: a frame trace on both desktop backends, and a window that cannot present stops ticking at 600 Hze3abf4dmap: the hosted-tile cache keeps the same ~2x-visible margin as the local one — a budget pinned at the visible set evicted the trailing edge of every pan on the next frame and refetched it a moment later8d542feplatform: a child pass orphaned by its attaching draw list is no longer painted — the window's gauss_scene pass stayed a live_with_parent child after the map went flat and re-encoded a frozen 400-item list every pan frame with stale geometry ids (new tile meshes × old instance counts, tens of millions of triangles into a texture nobody read); make_child_pass records the recording list + redraw id, stale passes are skipped, a cached View re-attaches on a cache hit; tests for the orphan gate and the pool generation contractbb49fe6map + platform: retained per-tile draw lists — each resident tile owns one DrawList2d per carto pass (fill, casing, stroke, icon, icon-high, shadow) and the label glyph batches are retained the same way, recorded when the bake, LOD ring, fringe/icon gates, flat/tilted or clip change and re-attached otherwise; a pan/zoom/tilt frame pushes this frame's uniforms onto the retained calls (DrawVars::update_uniforms_on_area, resolved slot table) and uploads zero instance bytes; the tilted per-pass depth is a pass_depth uniform; a held list's zbias resolves at entry (zbias_hold in every backend); the shimmer heartbeat patches shiny_time in place without a redraw; a freed/reused sub-list id is skipped by every draw-tree walker and the mask list re-records empty on the flat transition (contract test). Web pan tail 1,098 → 20 MiB/s, flat pan 2.4 → 0.43 MiB/frame; Metal grabs within the run-to-run noise floor 313265d Studio code atlas: geometry code views, live filter, 3D size lens, lanes as terminals 9c4e0cc Studio code atlas: performance round — retained uploads, worker labels, exact search, no forks 7235d7e Studio code atlas: stall fix, GPU working set, lens hard switch, filter masks, parallel index 56a6da5 platform: per-pass GPU counter timing on Metal; retained publications replace in place 72e2443 platform: present-path trace (1 Hz cause histograms), bounded drawable wait and retirement on macOS 1c5d583 platform: bounded retained maintenance on empty paint beats; republish actual backend debt edfed73 platform: retained residency high/low water and hysteresis; no distance eviction without pressure acab6a0 platform: critical upload class serves present-blocking items first; identical immediate re-records upload nothing 906c774 platform: uniform_range on DrawVars and patch_retained_uniforms on retained draw lists c29031c platform/draw/widgets: heap-keyed script resources and RecordingBuffer draw items — the files today's commits depend on cd0964f platform headless: homogeneous near-plane clipping before the perspective divide 61d424d platform: release retained bindings of released textures so pool evictions complete a00287a platform: texture-tile cache support — per-item instance ranges, painted pass receipts, display-dpi pass uniform, retained render targets, present gate on the drawable pool 74b63be platform: retained upload floor reverted, unconfirmed presents counted c03fcc5 platform: tile-cache round 3 support — O(1) demand on re-recorded lists, evictions counter, allocated_size, lost-button release, Vec2d::round e515d75 platform: shared instance publications — the DL-0/DL-1 contract, additive beside the retained path 142a337 platform: shared instance publications — close the seven review items (DL-1b) 6811a19 platform: Debug for SharedInstances, WeakSharedInstances and PublishReceipt c061e47 platform: Metal draws are resident by construction — the hole path and its gates are gone (DL-2) 0bdbb29 platform: drop the unreachable InstancesNotResident present cause de3c868 platform: `drawlist` trace names the holder of a stale draw-list id; the per-frame upload line moves to `gpu.upload` 721c3d8 platform: publication backends — Metal per-publication backings, lease-keyed uniform ring, receipts on every backend, Vulkan draws attached items (DL-3) 393de54 platform: integrated deletion — the draw-list system is generic again (DL-5) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
62 lines
2.4 KiB
Rust
62 lines
2.4 KiB
Rust
//! Exercise the native cursor loaders without a window or changing the user's
|
|
//! cursor. Hidden-window tests do not reliably invoke AppKit resetCursorRects.
|
|
|
|
#[cfg(all(target_os = "macos", not(gpusim)))]
|
|
fn main() {
|
|
use makepad_platform::{
|
|
os::apple::{apple_sys::*, apple_util::*},
|
|
MouseCursor,
|
|
};
|
|
|
|
unsafe {
|
|
let pool: ObjcId = msg_send![class!(NSAutoreleasePool), new];
|
|
let app: ObjcId = msg_send![class!(NSApplication), sharedApplication];
|
|
let _: BOOL = msg_send![app, setActivationPolicy: 2i64];
|
|
let cursor_class = class!(NSCursor);
|
|
let assert_cursor = |id: ObjcId| {
|
|
assert!(!id.is_null());
|
|
let valid: BOOL = msg_send![id, isKindOfClass: cursor_class];
|
|
assert_eq!(valid, YES);
|
|
// The cursor cache retains these returned objects before AppKit
|
|
// uses them, so exercise that ownership boundary as well.
|
|
let retained: ObjcId = msg_send![id, retain];
|
|
let _: NSPoint = msg_send![retained, hotSpot];
|
|
let _: () = msg_send![retained, release];
|
|
};
|
|
// Both supported and missing selector paths previously passed a BOOL
|
|
// as a selector and could terminate the process with SIGSEGV.
|
|
assert_cursor(load_undocumented_cursor("arrowCursor"));
|
|
assert_cursor(load_undocumented_cursor(
|
|
"_makepadMissingCursorForRegression",
|
|
));
|
|
for cursor in [
|
|
MouseCursor::Default,
|
|
MouseCursor::Text,
|
|
MouseCursor::Hand,
|
|
MouseCursor::Grab,
|
|
MouseCursor::Grabbing,
|
|
MouseCursor::Move,
|
|
MouseCursor::NResize,
|
|
MouseCursor::SResize,
|
|
MouseCursor::EResize,
|
|
MouseCursor::WResize,
|
|
MouseCursor::NeResize,
|
|
MouseCursor::NwResize,
|
|
MouseCursor::SeResize,
|
|
MouseCursor::SwResize,
|
|
MouseCursor::NeswResize,
|
|
MouseCursor::NwseResize,
|
|
MouseCursor::ColResize,
|
|
MouseCursor::RowResize,
|
|
MouseCursor::Help,
|
|
MouseCursor::Wait,
|
|
] {
|
|
assert_cursor(load_mouse_cursor(cursor));
|
|
}
|
|
let _: () = msg_send![pool, drain];
|
|
}
|
|
println!("Native cursor regression passed (supported/missing selectors and 20 cursor kinds)");
|
|
}
|
|
|
|
#[cfg(not(all(target_os = "macos", not(gpusim))))]
|
|
fn main() {}
|