Skip to content

Commit

Permalink
Performance tweak
Browse files Browse the repository at this point in the history
No need to update the bounding box on every tile, just do it the once when loading the source file.
  • Loading branch information
Ritchie333 committed May 22, 2024
1 parent 8ff51e1 commit 30503cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GenTiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ int TileJob::Render()
// cout << "c" << endl;

if( srcKml.copyPixels ) {
for (unsigned int i = 0; i < srcKml.bounds.size(); i++)
srcKml.copyPixels->UpdateBoundingBox(srcKml.bounds[i].c_str());
srcKml.copyPixels->Copy(tile, outImg, this->dst, this->mergeTiles);
}
} // End of copy KML source
Expand Down Expand Up @@ -652,6 +650,8 @@ int main(int argc, char **argv)
}

last.CreateCopyPixelsObj();
for (unsigned int i = 0; i < last.bounds.size(); i++)
last.copyPixels->UpdateBoundingBox(last.bounds[i].c_str());
}

cout << "Input files bounding box:" << endl;
Expand Down

0 comments on commit 30503cc

Please sign in to comment.