From 26f817319be3f0c21785cbf079ae2758a362bd63 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Jun 2013 14:11:55 +0300 Subject: Revert "improve a bit draw speed." This reverts commit ffabda4c473711ffa8fdfe37c2a4460fe31347ac. --- src/compoundsprite.cpp | 4 +--- src/compoundsprite.h | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index 074274ae1..a191afc59 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -60,7 +60,6 @@ CompoundSprite::CompoundSprite() : mDisableAdvBeingCaching(config.getBoolValue("disableAdvBeingCaching")), mDisableBeingCaching(config.getBoolValue("disableBeingCaching")), mSprites(), - mTempFramesCount(0), mNextRedrawTime(0) { mAlpha = 1.0f; @@ -218,7 +217,7 @@ unsigned int CompoundSprite::getCurrentFrame() const return 0; } -unsigned int CompoundSprite::getActualFrameCount() const +unsigned int CompoundSprite::getFrameCount() const { FOR_EACH (SpriteConstIterator, it, mSprites) { @@ -407,7 +406,6 @@ void CompoundSprite::setAlpha(float alpha) void CompoundSprite::updateImages() const { - mTempFramesCount = getActualFrameCount(); #ifdef USE_OPENGL if (imageHelper->useOpenGL()) return; diff --git a/src/compoundsprite.h b/src/compoundsprite.h index 20f5d371e..6049cdeb9 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -86,10 +86,7 @@ public: unsigned int getCurrentFrame() const override A_WARN_UNUSED; - unsigned int getActualFrameCount() const A_WARN_UNUSED; - - unsigned int getFrameCount() const override A_WARN_UNUSED - { return mTempFramesCount; } + unsigned int getFrameCount() const override A_WARN_UNUSED; size_t size() const A_WARN_UNUSED { return mSprites.size(); } @@ -158,7 +155,6 @@ private: bool mDisableAdvBeingCaching; bool mDisableBeingCaching; std::vector mSprites; - mutable int mTempFramesCount; mutable int mNextRedrawTime; static bool mEnableDelay; }; -- cgit v1.2.3-60-g2f50