MCPcopy Create free account
hub / github.com/axmolengine/axmol / reserveCapacity

Method reserveCapacity

core/2d/SpriteBatchNode.cpp:458–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458void SpriteBatchNode::reserveCapacity(ssize_t newCapacity)
459{
460 if (newCapacity <= _textureAtlas->getCapacity())
461 return;
462
463 if (!_textureAtlas->resizeCapacity(newCapacity))
464 {
465 // serious problems
466 AXLOGW("WARNING: Not enough memory to resize the atlas");
467 AXASSERT(false, "Not enough memory to resize the atlas");
468 }
469}
470
471ssize_t SpriteBatchNode::rebuildIndexInOrder(Sprite* parent, ssize_t index)
472{

Callers 1

updateBatchNodeMethod · 0.80

Calls 2

resizeCapacityMethod · 0.80
getCapacityMethod · 0.45

Tested by

no test coverage detected