Little performance improvements

Uses `AffineTransform::IDENTITY`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
This commit is contained in:
Ricardo Quesada 2013-08-26 18:08:21 -07:00
parent 62c578667b
commit 0093263c18
2 changed files with 3 additions and 3 deletions

View File

@ -225,7 +225,7 @@ bool Scale9Sprite::updateWithBatchNode(SpriteBatchNode* batchnode, Rect rect, bo
if (!rotated) {
// log("!rotated");
AffineTransform t = AffineTransformMakeIdentity();
AffineTransform t = AffineTransform::IDENTITY;
t = AffineTransformTranslate(t, rect.origin.x, rect.origin.y);
centerbounds = RectApplyAffineTransform(centerbounds, t);
@ -288,7 +288,7 @@ bool Scale9Sprite::updateWithBatchNode(SpriteBatchNode* batchnode, Rect rect, bo
// in the spritesheet
// log("rotated");
AffineTransform t = AffineTransformMakeIdentity();
AffineTransform t = AffineTransform::IDENTITY;
Rect rotatedcenterbounds = centerbounds;
Rect rotatedrightbottombounds = rightbottombounds;

View File

@ -419,7 +419,7 @@ void HoleDemo::setup()
_outerClipper = ClippingNode::create();
_outerClipper->retain();
AffineTransform tranform = AffineTransformMakeIdentity();
AffineTransform tranform = AffineTransform::IDENTITY;
tranform = AffineTransformScale(tranform, target->getScale(), target->getScale());
_outerClipper->setContentSize( SizeApplyAffineTransform(target->getContentSize(), tranform));