mirror of https://github.com/axmolengine/axmol.git
Don't assert since we remove deprecated pixel formats
This commit is contained in:
parent
6f8e07167b
commit
f159250c4e
|
@ -84,9 +84,7 @@ void SpriteFrameCachePixelFormatTest::loadSpriteFrames(std::string_view file,
|
||||||
const ssize_t bitsPerKB = 8 * 1024;
|
const ssize_t bitsPerKB = 8 * 1024;
|
||||||
const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width *
|
const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width *
|
||||||
texture->getContentSizeInPixels().height / bitsPerKB;
|
texture->getContentSizeInPixels().height / bitsPerKB;
|
||||||
#ifndef AX_USE_METAL
|
|
||||||
AX_ASSERT(texture->getPixelFormat() == expectedFormat);
|
|
||||||
#endif
|
|
||||||
const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(),
|
const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(),
|
||||||
texture->getStringForFormat(), memorySize);
|
texture->getStringForFormat(), memorySize);
|
||||||
infoLabel->setString(textureInfo);
|
infoLabel->setString(textureInfo);
|
||||||
|
@ -112,7 +110,6 @@ void SpriteFrameCacheLoadMultipleTimes::loadSpriteFrames(std::string_view file,
|
||||||
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(file);
|
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(file);
|
||||||
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("sprite_frames_test/grossini.png");
|
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("sprite_frames_test/grossini.png");
|
||||||
Texture2D* texture = spriteFrame->getTexture();
|
Texture2D* texture = spriteFrame->getTexture();
|
||||||
AX_ASSERT(texture->getPixelFormat() == expectedFormat);
|
|
||||||
|
|
||||||
SpriteFrameCache::getInstance()->removeSpriteFrameByName("sprite_frames_test/grossini.png");
|
SpriteFrameCache::getInstance()->removeSpriteFrameByName("sprite_frames_test/grossini.png");
|
||||||
Director::getInstance()->getTextureCache()->removeTexture(texture);
|
Director::getInstance()->getTextureCache()->removeTexture(texture);
|
||||||
|
@ -496,9 +493,6 @@ void SpriteFrameCacheJsonAtlasTest::loadSpriteFrames(std::string_view file,
|
||||||
const ssize_t bitsPerKB = 8 * 1024;
|
const ssize_t bitsPerKB = 8 * 1024;
|
||||||
const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width *
|
const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width *
|
||||||
texture->getContentSizeInPixels().height / bitsPerKB;
|
texture->getContentSizeInPixels().height / bitsPerKB;
|
||||||
#ifndef AX_USE_METAL
|
|
||||||
AX_ASSERT(texture->getPixelFormat() == expectedFormat);
|
|
||||||
#endif
|
|
||||||
const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(),
|
const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(),
|
||||||
texture->getStringForFormat(), memorySize);
|
texture->getStringForFormat(), memorySize);
|
||||||
infoLabel->setString(textureInfo);
|
infoLabel->setString(textureInfo);
|
||||||
|
|
Loading…
Reference in New Issue