|
|
|
|
|
|
|
|
|
|
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() { |
|
|
|