summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-25 19:59:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-25 19:59:16 +0300
commit6ac3afcb4f0a68488fde23afa0aa13362af2edba (patch)
tree467e739ffc41762a90ec382285cbfadb7de6156b /src/resources
parent45bd27b9b878fc2a96ef58a6224f4fcc4d615599 (diff)
downloadplus-6ac3afcb4f0a68488fde23afa0aa13362af2edba.tar.gz
plus-6ac3afcb4f0a68488fde23afa0aa13362af2edba.tar.bz2
plus-6ac3afcb4f0a68488fde23afa0aa13362af2edba.tar.xz
plus-6ac3afcb4f0a68488fde23afa0aa13362af2edba.zip
Add memory count method into SubImage.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/subimage.cpp7
-rw-r--r--src/resources/subimage.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp
index af579e4ec..1eac0d89d 100644
--- a/src/resources/subimage.cpp
+++ b/src/resources/subimage.cpp
@@ -222,3 +222,10 @@ void SubImage::decRef()
Resource::decRef();
}
#endif
+
+int SubImage::calcMemoryLocal()
+{
+ int sz = sizeof(SubImage) +
+ sizeof(std::map<float, SDL_Surface*>);
+ return sz;
+}
diff --git a/src/resources/subimage.h b/src/resources/subimage.h
index e7184574d..95c5f4100 100644
--- a/src/resources/subimage.h
+++ b/src/resources/subimage.h
@@ -78,6 +78,8 @@ class SubImage final : public Image
const int width,
const int height) override final A_WARN_UNUSED;
+ int calcMemoryLocal() override;
+
#ifdef USE_OPENGL
void decRef() override final;
#endif