Optimize hot loop in UpdateItems.
This commit is contained in:
parent
11dddefd05
commit
d3aed6c408
|
@ -1401,7 +1401,7 @@ void VIEW::UpdateItems()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned int cntGeomUpdate = 0;
|
unsigned int cntGeomUpdate = 0;
|
||||||
unsigned int cntAnyUpdate = 0;
|
bool anyUpdated = false;
|
||||||
|
|
||||||
for( VIEW_ITEM* item : *m_allItems )
|
for( VIEW_ITEM* item : *m_allItems )
|
||||||
{
|
{
|
||||||
|
@ -1410,13 +1410,14 @@ void VIEW::UpdateItems()
|
||||||
if( !vpd )
|
if( !vpd )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( vpd->m_requiredUpdate != NONE )
|
||||||
|
{
|
||||||
|
anyUpdated = true;
|
||||||
|
|
||||||
if( vpd->m_requiredUpdate & ( GEOMETRY | LAYERS ) )
|
if( vpd->m_requiredUpdate & ( GEOMETRY | LAYERS ) )
|
||||||
{
|
{
|
||||||
cntGeomUpdate++;
|
cntGeomUpdate++;
|
||||||
}
|
}
|
||||||
if( vpd->m_requiredUpdate != NONE )
|
|
||||||
{
|
|
||||||
cntAnyUpdate++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1456,7 +1457,7 @@ void VIEW::UpdateItems()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cntAnyUpdate )
|
if( anyUpdated )
|
||||||
{
|
{
|
||||||
GAL_UPDATE_CONTEXT ctx( m_gal );
|
GAL_UPDATE_CONTEXT ctx( m_gal );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue