You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retained drawing: draw.Picture, picture_begin / picture_end (record what is drawn between them instead of
drawing it), replay(dc, pic, m) (Replay_Result: Drawn, Culled, Stale), picture_destroy, picture_release, picture_bounds, picture_stale, picture_size, recording. Transforms pushed while
recording are slots (current_slot, push_slot, picture_set_slot, picture_slot): their matrices change
without recording again (one GPU range rewritten). Clips pushed while recording are mapped at replay (an exact
scissor under a uniform scale + translation, as push_clip). A replay draws under the current transform, alpha
stack and clips, in the order of the frame (immediate drawing and replays mix). Pictures that would show text at
another raster size, or whose glyphs were evicted from the atlas, report Stale.
Persistent GPU heaps for pictures (render.Heap_Kind, heap_alloc, heap_free, heap_write, heap_bytes, heaps_reset, Slot_Data, Replay, Batch.replay, Frame_Data.replays): first-fit ranges, growth by
GPU copy. draw.set_retained_budget / retained_bytes: pictures not drawn in the current frame are evicted
(least recently drawn first) past the budget and uploaded again from their recording when drawn.
Device loss: render.recover recreates the device, the swap chain or offscreen target, the pipeline and every
texture under the same handle (contents cleared: device_generation changes); frame_begin and draw.begin_frame recover on their own (Present failures and GetDeviceRemovedReason are watched); device_lost, simulate_device_loss (tests). The glyph atlas is reset, the heaps emptied (heap_generation).
Box shadows: draw.box_shadow (outer, optionally cut out of a rounded rect) and draw.inset_shadow: the
exact gaussian blur of a rounded rect with per-corner radii (erf along x, the corner arcs integrated over their
angle), render.KIND_SHADOW, SHADOW_INSET, SHADOW_HOLE.
Tests: tests/retained (replay identical to direct drawing, slots, z order, partial recording, culling, budget,
device loss, in both blend spaces), tests/gradients, tests/shadows (against a numeric convolution).
examples/transforms --retained (with --stress=N).
Changed
Clip_Data is 96 bytes; render.init and init_offscreen are split (create_swapchain, create_offscreen_target) so that recover can rebuild them.
push_effects / push_layer while recording fall back to the alpha (a picture holds no offscreen layer); backdrop_capture returns nothing.