From d4ed71b639f042bb536c7bdd90c142256a3917d4 Mon Sep 17 00:00:00 2001 From: ldeffenb Date: Mon, 3 Apr 2017 15:52:46 -0400 Subject: [PATCH] Uncomment missing ReportTextureAlloc to balance numbers, Divide size by 1024 to match MOAITexture_MemoryUse_SDFS format with k --- src/moai-sim/MOAIGfxMgr.cpp | 4 ++-- src/moai-sim/MOAISingleTexture.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/moai-sim/MOAIGfxMgr.cpp b/src/moai-sim/MOAIGfxMgr.cpp index d064f680da..37aa41d18f 100644 --- a/src/moai-sim/MOAIGfxMgr.cpp +++ b/src/moai-sim/MOAIGfxMgr.cpp @@ -359,7 +359,7 @@ void MOAIGfxMgr::ReportTextureAlloc ( cc8* name, size_t size ) { this->mTextureMemoryUsage += size; float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; - MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size, mb, name ); + MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size/1024, mb, name ); } //----------------------------------------------------------------// @@ -367,7 +367,7 @@ void MOAIGfxMgr::ReportTextureFree ( cc8* name, size_t size ) { this->mTextureMemoryUsage -= size; float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; - MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size, mb, name ); + MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size/1024, mb, name ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAISingleTexture.cpp b/src/moai-sim/MOAISingleTexture.cpp index c7ef0bc80b..d4deb61c7d 100644 --- a/src/moai-sim/MOAISingleTexture.cpp +++ b/src/moai-sim/MOAISingleTexture.cpp @@ -287,7 +287,7 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { } } - //MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); + MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); return true; }