Fix problems discovered when test:

1. Add include file in ccConfig.h
2. Resolve the memory leak in PerformanceSpriteTest.
3. Delete the 2048 * 2048 texture test case in PerformanceTextureTest.
This commit is contained in:
natural-law 2011-04-07 14:30:35 +08:00
parent f3b1385279
commit b72b5306d2
5 changed files with 16 additions and 4 deletions

View File

@ -26,6 +26,8 @@ THE SOFTWARE.
#ifndef __CCCONFIG_H__
#define __CCCONFIG_H__
#include "CCPlatformConfig.h"
/** @def CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
If enabled, the texture coordinates will be calculated by using this formula:
- texCoord.left = (rect.origin.x*2+1) / (texture.wide*2);

View File

@ -81,7 +81,7 @@ void MotionStreakTest2::ccTouchesMoved(CCSet* touches, CCEvent* event)
std::string MotionStreakTest2::title()
{
return "MotionStreak test (tap screen)";
return "MotionStreak test";
}
//------------------------------------------------------------------

View File

@ -20,6 +20,15 @@ static int s_nSpriteCurCase = 0;
// SubTest
//
////////////////////////////////////////////////////////
SubTest::~SubTest()
{
if (batchNode)
{
batchNode->release();
batchNode = NULL;
}
}
void SubTest::initWithSubTest(int nSubTest, CCNode* p)
{
subtestNumber = nSubTest;

View File

@ -6,6 +6,7 @@
class SubTest
{
public:
~SubTest();
void removeByTag(int tag);
CCSprite* createSpriteWithTag(int tag);
void initWithSubTest(int nSubTest, CCNode* parent);

View File

@ -317,9 +317,9 @@ void TextureTest::performTests()
// RGBA444
//
CCLog("\n\n--- PNG 2048x2048 ---\n");
performTestsPNG("Images/texture2048x2048.png");
// most platform don't support texture with width/height is 2048
// CCLog("\n\n--- PNG 2048x2048 ---\n");
// performTestsPNG("Images/texture2048x2048.png");
// CCLog("--- PVR 2048x2048 ---\n");
// CCLog("RGBA 4444");