[core] Eliminate SpriteAtlas::updateDirty

Simplify internal datastructures. Properly remove rects from the bin pack when an image is removed.
This commit is contained in:
John Firebaugh
2017-02-13 15:19:44 -08:00
parent 3fa6a4f4ff
commit 5524506abd
5 changed files with 113 additions and 105 deletions

View File

@@ -924,8 +924,6 @@ void Map::addImage(const std::string& name, std::unique_ptr<const SpriteImage> i
impl->styleMutated = true;
impl->style->spriteAtlas->setSprite(name, std::move(image));
impl->style->spriteAtlas->updateDirty();
impl->onUpdate(Update::Repaint);
}
@@ -936,8 +934,6 @@ void Map::removeImage(const std::string& name) {
impl->styleMutated = true;
impl->style->spriteAtlas->removeSprite(name);
impl->style->spriteAtlas->updateDirty();
impl->onUpdate(Update::Repaint);
}