3 * - By John Hodge (thePowersGang)
9 #include <compositor.hpp>
10 #include <CCompositor.hpp>
14 CCompositor::CCompositor()
19 CWindow* CCompositor::CreateWindow(CClient& client)
21 return new CWindow(client, "TODO");
24 void CCompositor::Redraw()
26 // Redraw the screen and clear damage rects
27 if( m_damageRects.empty() )
30 // Build up foreground grid (Rects and windows)
31 // - This should already be built (mutated on window move/resize/reorder)
33 // For all windows, check for intersection with damage rects
34 for( auto rect : m_damageRects )
36 for( auto window : m_windows )
38 if( rect.Contains( window->m_rect ) )
40 window->Repaint( rect );
45 m_damageRects.clear();
48 void CCompositor::DamageArea(const CRect& area)
50 // 1. Locate intersection with any existing damaged areas
51 // 2. Append after removing intersections