Skip to content

Commit db6d3c6

Browse files
ryanbreenclaude
andauthored
feat(graphics): Phase 3 - 2D graphics primitives + xtask QEMU isolation (#98)
* feat(graphics): add 2D graphics primitives module (Phase 3) Implements Phase 3 of the graphics stack with 2D drawing primitives: Core types: - Color struct with RGB support and BGR/RGB pixel format conversion - Point and Rect structs for geometry - Canvas trait for abstracted drawing surface Drawing functions: - draw_hline/draw_vline: Optimized horizontal/vertical lines - draw_line: General line drawing using Bresenham's algorithm - draw_rect: Rectangle outline - fill_rect: Filled rectangle with row optimization - draw_circle/fill_circle: Circle using midpoint algorithm Integration: - ShellFrameBuffer implements Canvas trait - draw_test_pattern() demo function for testing All drawing functions handle bounds checking and clipping automatically. Coordinates use i32 to allow negative values (clipped at canvas boundary). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(xtask): use per-worktree PID tracking instead of global pkill Replace all instances of `pkill -9 qemu-system-x86_64` with worktree-specific PID file tracking. This allows multiple worktrees to run boot-stages tests simultaneously without killing each other's QEMU processes. Changes: - Add get_qemu_pid_file() to generate unique PID file path per worktree - Add signal_worktree_qemu() to send signals to specific QEMU process - Add kill_worktree_qemu() and term_worktree_qemu() helpers - Add save_qemu_pid() to track QEMU PID on startup - Replace all 6 pkill calls with worktree-specific PID-based killing PID files are stored at /tmp/breenix-qemu-<worktree-hash>.pid using a hash of the current working directory for uniqueness. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a09ae65 commit db6d3c6

File tree

4 files changed

+642
-23
lines changed

4 files changed

+642
-23
lines changed

kernel/src/graphics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
//! Provides framebuffer abstractions used by the kernel graphics stack.
44
55
pub mod double_buffer;
6+
pub mod primitives;
67

78
pub use double_buffer::DoubleBufferedFrameBuffer;

0 commit comments

Comments
 (0)