Improve render component disable performance

This commit is contained in:
pandamicro
2018-04-13 22:53:33 +08:00
parent db29ec79c1
commit 607d7b2228
2 changed files with 3 additions and 4 deletions
@@ -70,10 +70,6 @@ var RenderComponent = cc.Class({
onDisable () {
this.node._renderComponent = null;
// When parent children order dirty, its children's render component will be rechained in sortAllChildren
if (!this.node.parent._reorderChildDirty) {
hierarchyChain.rebuildSelf(this.node);
}
},
onDestroy () {
@@ -294,6 +294,9 @@ RenderComponentWalker.prototype = {
for (; entry; entry = entry.next) {
let comp = entry.comp;
let node = comp.node;
if (!comp._enabled || !node._activeInHierarchy) {
continue;
}
let assembler = null;
// Pre handle