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