feat(k-ui): motion: ring springs to focus, toggle knob slides, screens slide+fade in (theme motion tokens, 0 = off); 16ms frame timer only while moving; motion-only frames drawn+presented in part (whole elements, pixel-snapped rects, == full draw); virtio fb flushes only damage; TICKS_PER_MS in types
This commit is contained in:
@@ -65,11 +65,13 @@ pub struct Rect {
|
||||
pub h: u32,
|
||||
}
|
||||
|
||||
pub fn transfer_to_host(mmio: &impl MmioAccess, queue: &VirtioQueue, dma: &GpuDmaAddrs, resource_id: u32, rect: Rect) -> bool {
|
||||
/// Copies `rect` of the backing to the host; `offset` is where its top
|
||||
/// left pixel is in the backing, in bytes.
|
||||
pub fn transfer_to_host(mmio: &impl MmioAccess, queue: &VirtioQueue, dma: &GpuDmaAddrs, resource_id: u32, rect: Rect, offset: u64) -> bool {
|
||||
write_cmd_header(&dma.cmd, 0x0105);
|
||||
put_rect(&dma.cmd, rect);
|
||||
// Offset into the resource's memory, then the resource id.
|
||||
dma.cmd.write(BODY + 16, 0u64);
|
||||
dma.cmd.write(BODY + 16, offset);
|
||||
dma.cmd.write(BODY + 24, resource_id);
|
||||
submit_cmd(mmio, queue, dma, 56)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user