From 6af6af35b29622f784d2320a2406574567aaec50 Mon Sep 17 00:00:00 2001 From: Weiliang Wang Date: Tue, 18 Jun 2019 16:51:11 +0800 Subject: [PATCH] split present() from root.frameMove() (#4647) --- cocos/core/director.ts | 5 ++++- cocos/core/root.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cocos/core/director.ts b/cocos/core/director.ts index 975a527c08..56e0a4fb11 100644 --- a/cocos/core/director.ts +++ b/cocos/core/director.ts @@ -1071,12 +1071,15 @@ class Director extends EventTarget { this._physicsSystem!.update(this._deltaTime); this.emit(cc.Director.EVENT_BEFORE_DRAW); - this._root!.frameMove(this._deltaTime); // Render + this._root!.frameMove(this._deltaTime); this.emit(cc.Director.EVENT_AFTER_DRAW); eventManager.frameUpdateListeners(); if (this._scene) { this._scene.resetHasChanged(); } this._totalFrames++; + + // Present current frame + this._root!.device.present(); } } diff --git a/cocos/core/root.ts b/cocos/core/root.ts index ce5e3abcc5..c1a75ea31a 100644 --- a/cocos/core/root.ts +++ b/cocos/core/root.ts @@ -281,7 +281,7 @@ export class Root { } } - this._device.present(); + // this._device.present(); } /**