-
Notifications
You must be signed in to change notification settings - Fork 2
Dirty Rectangles
Dirty rectangles are Gondwana’s redraw currency for the CPU-backed BitmapBackbuffer. They are not used with the GpuBackbuffer.
There are two different kinds , and confusing them causes bugs:
- world dirty rectangles — stored in RefreshQueue
- screen dirty rectangles — tracked by the backbuffer for presentation
These say: “this part of the world needs to be rerendered.”
They are layer-relative in the sense that each layer owns its own queue, but the rectangles themselves are stored in world pixels.
These say: “this part of the render surface changed and needs to be presented.”
These live on the backbuffer and are always in adapter/control screen pixels.
Because a single world change can project into different screen rectangles depending on:
- camera position
- viewport placement
- zoom
- parallax
- overlapping multi-view layouts
That separation is what makes the view-centric model work cleanly.
If you are invalidating scene content, think in world rects. If you are presenting to the UI adapter, think in screen rects.
Gondwana/Rendering/RefreshQueue.csGondwana/Rendering/Views/View.csGondwana/Rendering/Backbuffers/BackbufferBase.cs