// dvx_comp.h — Layer 3: Dirty rectangle compositor for DV/X GUI #ifndef DVX_COMP_H #define DVX_COMP_H #include "dvxTypes.h" // Initialize the dirty list void dirtyListInit(DirtyListT *dl); // Add a rectangle to the dirty list void dirtyListAdd(DirtyListT *dl, int32_t x, int32_t y, int32_t w, int32_t h); // Merge overlapping/adjacent dirty rects to reduce redraw work void dirtyListMerge(DirtyListT *dl); // Clear the dirty list void dirtyListClear(DirtyListT *dl); // Flush a single rectangle from backbuffer to LFB void flushRect(DisplayT *d, const RectT *r); // Intersect two rectangles, returns true if intersection is non-empty bool rectIntersect(const RectT *a, const RectT *b, RectT *result); // Test if a rectangle is empty (zero or negative area) bool rectIsEmpty(const RectT *r); #endif // DVX_COMP_H