void CGUIControlGroup::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) { CPoint pos(GetPosition()); g_graphicsContext.SetOrigin(pos.x, pos.y); CRect rect; for (iControls it = m_children.begin(); it != m_children.end(); ++it) { CGUIControl *control = *it; control->UpdateVisibility(); unsigned int oldDirty = dirtyregions.size(); control->DoProcess(currentTime, dirtyregions); if (control->IsVisible() || (oldDirty != dirtyregions.size())) // visible or dirty (was visible?) rect.Union(control->GetRenderRegion()); } g_graphicsContext.RestoreOrigin(); CGUIControl::Process(currentTime, dirtyregions); m_renderRegion = rect; }
void CGUIListGroup::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) { CServiceBroker::GetWinSystem()->GetGfxContext().SetOrigin(m_posX, m_posY); CRect rect; for (iControls it = m_children.begin(); it != m_children.end(); ++it) { CGUIControl *control = *it; control->UpdateVisibility(m_item); unsigned int oldDirty = dirtyregions.size(); control->DoProcess(currentTime, dirtyregions); if (control->IsVisible() || (oldDirty != dirtyregions.size())) // visible or dirty (was visible?) rect.Union(control->GetRenderRegion()); } CServiceBroker::GetWinSystem()->GetGfxContext().RestoreOrigin(); CGUIControl::Process(currentTime, dirtyregions); m_renderRegion = rect; m_item = NULL; }