From 2a47639b7bf96cb6231be4600d277c4cd67e4707 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 18 Dec 2024 10:29:48 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20the=20issue=20where=20UI=20batc?= =?UTF-8?q?hing=20breaks=20under=20specific=20conditions.=20(#1=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4eb107483366f22c617a3a23c12be10caae43289. --- cocos/2d/framework/ui-renderer.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cocos/2d/framework/ui-renderer.ts b/cocos/2d/framework/ui-renderer.ts index c202bed6a7c..1bb55a0e652 100644 --- a/cocos/2d/framework/ui-renderer.ts +++ b/cocos/2d/framework/ui-renderer.ts @@ -320,10 +320,6 @@ export class UIRenderer extends Renderer { this.node.on(NodeEventType.ANCHOR_CHANGED, this._nodeStateChange, this); this.node.on(NodeEventType.SIZE_CHANGED, this._nodeStateChange, this); this.node.on(NodeEventType.PARENT_CHANGED, this._colorDirty, this); - // If the renderData is invalid, it needs to be rebuilt to recalculate the batch processing. - if (!this._renderData && this._flushAssembler) { - this._flushAssembler(); - } this.updateMaterial(); this._colorDirty(); uiRendererManager.addRenderer(this); @@ -341,9 +337,6 @@ export class UIRenderer extends Renderer { this.node.off(NodeEventType.ANCHOR_CHANGED, this._nodeStateChange, this); this.node.off(NodeEventType.SIZE_CHANGED, this._nodeStateChange, this); this.node.off(NodeEventType.PARENT_CHANGED, this._colorDirty, this); - // When disabling, it is necessary to free up idle space to fully utilize chunks - // and avoid breaking batch processing. - this.destroyRenderData(); uiRendererManager.removeRenderer(this); this._renderFlag = false; this._renderEntity.enabled = false;