fix(renderer): partial-render blockers from adversarial review (#617)

B1: femtovg Canvas::set_size queues SetRenderTarget(Screen) without
updating current_render_target — the scene set_render_target() was
silently undone and the Copy blit overwrote the frame with the empty
persistent texture (black window on the first env-gated frame).
Root-fixed in vendored femtovg (keep the field in sync with the queued
command — upstream-able) + re-assert the scene target after the
notifier block's set_size.

B2: BoxShadow/Transform/Opacity/Layer/Clip bypass the proxy's
filter_item and re-render every frame (core item_rendering.rs:209-217)
— with a multi-rect dirty region they re-blended over uncleared pixels
in the gaps between rects (progressive smear). Collapse the dirty
region to its single bounding rect so filter, scissor and clears all
agree on one rect.

M1: visualize outline now strokes on the swapchain after the blit
(drawn into the persistent texture it accumulated).

Also: case-insensitive env parsing; stale-comment corrections.

km
This commit is contained in:
vicrodh committed 2026-07-19 16:08:02 -06:00
1 parent f239596ed5
commit 1adf4e6f9d
3 files changed
+77 -34

No files matched your search

@@ -1185,8 +1185,10 @@ impl<'a, R: femtovg::Renderer + TextureImporter> GLItemRenderer<'a, R> {
global_alpha: 1.,
current_render_target: layer_image.as_render_target(),
// Layer renders into its own offscreen target with the canvas
// translated by -origin; identity is a safe placeholder here while
// this is inert. Revisit when stage 3 wires layer dirty-tracking.
// translated by -origin. identity is CORRECT here even with the
// stage-3 partial renderer wired: render_layer renders children
// through this inner GLItemRenderer directly, so the core proxy
// never queries current_transform() inside a layer pass.
transform: ItemTransform::identity(),
};