summaryrefslogtreecommitdiff
path: root/src/resources/atlas/atlasresource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/atlas/atlasresource.cpp')
-rw-r--r--src/resources/atlas/atlasresource.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp
index 089d12bb7..d48394698 100644
--- a/src/resources/atlas/atlasresource.cpp
+++ b/src/resources/atlas/atlasresource.cpp
@@ -71,4 +71,22 @@ void AtlasResource::decRef()
AtlasManager::moveToDeleted(this);
}
+int AtlasResource::calcMemoryLocal()
+{
+ return sizeof(AtlasResource) +
+ Resource::calcMemoryLocal() +
+ atlases.capacity() * sizeof(TextureAtlas*);
+}
+
+int AtlasResource::calcMemoryChilds(const int level)
+{
+ int sz = 0;
+ FOR_EACH (std::vector<TextureAtlas*>::iterator, it, atlases)
+ {
+ TextureAtlas *const atlas = *it;
+ sz += atlas->calcMemory(level + 1);
+ }
+ return sz;
+}
+
#endif