Be more diligent about checking for zone file deps

The outline collision is relatively cheap (especially after filtering
bbox collisions) so check if a zone REALLY depends on another zone
before making it wait.  Waiting for zones can really increase the total
fill time
This commit is contained in:
Seth Hillbrand 2022-09-16 17:21:51 -07:00
parent e0a6ff3f14
commit 8e361e8a15
1 changed files with 4 additions and 1 deletions

View File

@ -210,7 +210,10 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
BOX2I inflatedBBox = aZone->GetCachedBoundingBox();
inflatedBBox.Inflate( m_worstClearance );
return inflatedBBox.Intersects( aOtherZone->GetCachedBoundingBox() );
if( !inflatedBBox.Intersects( aOtherZone->GetCachedBoundingBox() ) )
return false;
return aZone->Outline()->Collide( aOtherZone->Outline(), m_worstClearance );
};
auto fill_lambda =