|
|
|
|
|
|
this._devicePixelRatio = this.queryDevicePixelRatio(); |
|
|
|
this._antiAliasing = this.queryAntiAliasing(); |
|
|
|
|
|
|
|
var size = this.queryWindowSize(); |
|
|
|
this._lastWindowWidth = size.x; |
|
|
|
this._lastWindowHeight = size.y; |
|
|
|
this._physicalSize = new Size( |
|
|
|
this._lastWindowWidth * this._devicePixelRatio, |
|
|
|
this._lastWindowHeight * this._devicePixelRatio); |
|
|
|
|
|
|
|
this.updateSafeArea(); |
|
|
|
D.assert(this._surface == null); |
|
|
|
this._surface = this.createSurface(); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void Update() { |
|
|
|
if (this._physicalSize == null) { |
|
|
|
var size = this.queryWindowSize(); |
|
|
|
this._lastWindowWidth = size.x; |
|
|
|
this._lastWindowHeight = size.y; |
|
|
|
this._physicalSize = new Size( |
|
|
|
this._lastWindowWidth * this._devicePixelRatio, |
|
|
|
this._lastWindowHeight * this._devicePixelRatio); |
|
|
|
} |
|
|
|
|
|
|
|
this.updateDeltaTime(); |
|
|
|
this.updateFPS(this.unscaledDeltaTime); |
|
|
|
|
|
|
|
|
|
|
this.flushMicrotasks(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void scheduleFrame(bool regenerateLayerTree = true) { |
|
|
|
if (regenerateLayerTree) { |
|
|
|
this._regenerateLayerTree = true; |
|
|
|