pub fn resolve_clip_render_plan(
clip: &ClipStackSnapshot,
draw_cmd_count: usize,
) -> RenderClipPlanExpand description
Resolves a stack of clips without fusing away root/window metadata.
draw_cmd_count influences only the rounded-mask strategy. The returned
scissor remains in logical coordinates; conversion to physical pixels occurs
at pass encoding.
ยงExamples
use ailloli_ui_core::{ClipShape, Rect};
use ailloli_ui_render_wgpu::{resolve_clip_render_plan, ClipRenderMode};
use ailloli_ui_runtime::scene::{ClipEntry, ClipStackSnapshot};
let clip = ClipStackSnapshot::from_entries(vec![ClipEntry::new(
ClipShape::Rect(Rect::new(0.0, 0.0, 20.0, 10.0)), false)]);
let plan = resolve_clip_render_plan(&clip, 1);
assert_eq!(plan.clip_mode, ClipRenderMode::Scissor);