浏览代码

minor fixes

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
52996133
共有 2 个文件被更改,包括 10 次插入19 次删除
  1. 27
      engine/src/shell/common/shell.cc
  2. 2
      engine/src/shell/common/shell.h

27
engine/src/shell/common/shell.cc


task_runners_.GetUITaskRunner()->PostDelayedTask(
[self = this]() {
self->PostReportTiming();
self->task_runners_.GetRasterTaskRunner()->PostTask(
[self2 = self->weak_factory_gpu_->GetWeakPtr()]() {
if (!self2.get()) {
return;
}
self2->frame_timings_report_scheduled_ = false;
if (self2->UnreportedFramesCount() > 0) {
self2->ReportTimings();
}
});
}
void Shell::PostReportTiming()
{
task_runners_.GetRasterTaskRunner()->PostDelayedTask(
[self = weak_factory_gpu_->GetWeakPtr()]() {
if (!self.get()) {
return;
}
self->frame_timings_report_scheduled_ = false;
if (self->UnreportedFramesCount() > 0) {
self->ReportTimings();
}
},
fml::TimeDelta::FromMilliseconds(0));
}
fml::Milliseconds Shell::GetFrameBudget() {

2
engine/src/shell/common/shell.h


void ReportTimings();
void PostReportTiming();
// |PlatformView::Delegate|
void OnPlatformViewCreated(std::unique_ptr<Surface> surface) override;

正在加载...
取消
保存