mirror of https://github.com/axmolengine/axmol.git
Little performance improvements
Uses `AffineTransform::IDENTITY` Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
This commit is contained in:
parent
62c578667b
commit
0093263c18
|
@ -225,7 +225,7 @@ bool Scale9Sprite::updateWithBatchNode(SpriteBatchNode* batchnode, Rect rect, bo
|
||||||
if (!rotated) {
|
if (!rotated) {
|
||||||
// log("!rotated");
|
// log("!rotated");
|
||||||
|
|
||||||
AffineTransform t = AffineTransformMakeIdentity();
|
AffineTransform t = AffineTransform::IDENTITY;
|
||||||
t = AffineTransformTranslate(t, rect.origin.x, rect.origin.y);
|
t = AffineTransformTranslate(t, rect.origin.x, rect.origin.y);
|
||||||
|
|
||||||
centerbounds = RectApplyAffineTransform(centerbounds, t);
|
centerbounds = RectApplyAffineTransform(centerbounds, t);
|
||||||
|
@ -288,7 +288,7 @@ bool Scale9Sprite::updateWithBatchNode(SpriteBatchNode* batchnode, Rect rect, bo
|
||||||
// in the spritesheet
|
// in the spritesheet
|
||||||
// log("rotated");
|
// log("rotated");
|
||||||
|
|
||||||
AffineTransform t = AffineTransformMakeIdentity();
|
AffineTransform t = AffineTransform::IDENTITY;
|
||||||
|
|
||||||
Rect rotatedcenterbounds = centerbounds;
|
Rect rotatedcenterbounds = centerbounds;
|
||||||
Rect rotatedrightbottombounds = rightbottombounds;
|
Rect rotatedrightbottombounds = rightbottombounds;
|
||||||
|
|
|
@ -419,7 +419,7 @@ void HoleDemo::setup()
|
||||||
|
|
||||||
_outerClipper = ClippingNode::create();
|
_outerClipper = ClippingNode::create();
|
||||||
_outerClipper->retain();
|
_outerClipper->retain();
|
||||||
AffineTransform tranform = AffineTransformMakeIdentity();
|
AffineTransform tranform = AffineTransform::IDENTITY;
|
||||||
tranform = AffineTransformScale(tranform, target->getScale(), target->getScale());
|
tranform = AffineTransformScale(tranform, target->getScale(), target->getScale());
|
||||||
|
|
||||||
_outerClipper->setContentSize( SizeApplyAffineTransform(target->getContentSize(), tranform));
|
_outerClipper->setContentSize( SizeApplyAffineTransform(target->getContentSize(), tranform));
|
||||||
|
|
Loading…
Reference in New Issue