浏览代码

[1.5.4] Upgrade image stream.

/main
Yuncong Zhang 5 年前
当前提交
609b0c95
共有 1 个文件被更改,包括 18 次插入8 次删除
  1. 26
      Runtime/painting/image_stream.cs

26
Runtime/painting/image_stream.cs


new UIWidgetsErrorDetails(
exception: ex,
library: "image resource service",
context: "by a synchronously-called image error listener"
context: "when reporting an error to an image listener"
)
);
}

this._scale = scale;
this._informationCollector = informationCollector;
this._framesEmitted = 0;
this._timer = null;
codec.Then((Action<Codec>) this._handleCodecReady, ex => {
this.reportError(
context: "resolving an image codec",

FrameInfo _nextFrame;
TimeSpan? _shownTimestamp;
TimeSpan? _frameDuration;
int _framesEmitted;
int _framesEmitted = 0;
bool _frameCallbackScheduled = false;
this._decodeNextFrameAndSchedule();
if (this.hasListeners) {
this._decodeNextFrameAndSchedule();
}
this._frameCallbackScheduled = false;
if (!this.hasListeners) {
return;
}

TimeSpan delay = this._frameDuration.Value - (timestamp - this._shownTimestamp.Value);
delay = new TimeSpan((long) (delay.Ticks * SchedulerBinding.instance.timeDilation));
this._timer = Window.instance.run(delay,
() => { SchedulerBinding.instance.scheduleFrameCallback(this._handleAppFrame); });
this._timer = Window.instance.run(delay, this._scheduleAppFrame);
}
bool _isFirstFrame() {

return;
}
this._scheduleAppFrame();
}
void _scheduleAppFrame() {
if (this._frameCallbackScheduled) {
return;
}
this._frameCallbackScheduled = true;
SchedulerBinding.instance.scheduleFrameCallback(this._handleAppFrame);
}

正在加载...
取消
保存