Skip to content

Commit

Permalink
Trim whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Dec 21, 2024
1 parent 8f82630 commit a5f9b4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions native/cocos/2d/renderer/Batcher2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void Batcher2d::generateBatch(RenderEntity* entity, RenderDrawInfo* drawInfo) {
return;
}
gfx::InputAssembler* ia = nullptr;

uint32_t indexOffset = 0;
uint32_t indexCount = 0;
if (drawInfo->getIsMeshBuffer()) {
Expand All @@ -345,9 +345,9 @@ void Batcher2d::generateBatch(RenderEntity* entity, RenderDrawInfo* drawInfo) {
_meshRenderDrawInfo.emplace_back(drawInfo);
} else {
UIMeshBuffer* currMeshBuffer = drawInfo->getMeshBuffer();

currMeshBuffer->setDirty(true);

ia = currMeshBuffer->requireFreeIA(getDevice());
indexCount = currMeshBuffer->getIndexOffset() - _indexStart;
if (ia == nullptr) {
Expand All @@ -356,16 +356,16 @@ void Batcher2d::generateBatch(RenderEntity* entity, RenderDrawInfo* drawInfo) {
indexOffset = _indexStart;
_indexStart = currMeshBuffer->getIndexOffset();
}

_currMeshBuffer = nullptr;

// stencilStage
gfx::DepthStencilState* depthStencil = nullptr;
ccstd::hash_t dssHash = 0;
StencilStage entityStage = entity->getEnumStencilStage();
depthStencil = _stencilManager->getDepthStencilState(entityStage, _currMaterial);
dssHash = _stencilManager->getStencilHash(entityStage);

auto* curdrawBatch = _drawBatchPool.alloc();
curdrawBatch->setVisFlags(_currLayer);
curdrawBatch->setInputAssembler(ia);
Expand Down

0 comments on commit a5f9b4e

Please sign in to comment.