From 49bc7f0ba770d152ddfb7b5251f53e27988c33b0 Mon Sep 17 00:00:00 2001 From: "Ming Lyu (CareF)" Date: Mon, 10 Aug 2020 14:15:15 -0400 Subject: [PATCH] remove FrameTiming named constructor --- lib/ui/window.dart | 24 ------------------------ lib/web_ui/lib/src/ui/window.dart | 24 ------------------------ 2 files changed, 48 deletions(-) diff --git a/lib/ui/window.dart b/lib/ui/window.dart index 4bc5e2ec5fe3f..be542150385de 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -117,30 +117,6 @@ class FrameTiming { FrameTiming._(List timestamps) : assert(timestamps.length == FramePhase.values.length), _timestamps = timestamps; - /// Construct [FrameTiming] with given timestamp in micrseconds. - /// - /// This constructor is used for unit test only. Real [FrameTiming]s should - /// be retrieved from [Window.onReportTimings]. - /// - /// TODO(CareF): This is part of #20229. Remove back to default constructor - /// after #20229 lands and corresponding framwork PRs land. - factory FrameTiming.fromTimeStamps({ - int? vsyncStart, - required int buildStart, - required int buildFinish, - required int rasterStart, - required int rasterFinish - }) { - return FrameTiming._([ - // This is for temporarily backward compatiblilty. - vsyncStart ?? buildStart, - buildStart, - buildFinish, - rasterStart, - rasterFinish - ]); - } - /// This is a raw timestamp in microseconds from some epoch. The epoch in all /// [FrameTiming] is the same, but it may not match [DateTime]'s epoch. int timestampInMicroseconds(FramePhase phase) => _timestamps[phase.index]; diff --git a/lib/web_ui/lib/src/ui/window.dart b/lib/web_ui/lib/src/ui/window.dart index b90051e637c77..ae795912a6539 100644 --- a/lib/web_ui/lib/src/ui/window.dart +++ b/lib/web_ui/lib/src/ui/window.dart @@ -1070,30 +1070,6 @@ class FrameTiming { FrameTiming._(List timestamps) : assert(timestamps.length == FramePhase.values.length), _timestamps = timestamps; - /// Construct [FrameTiming] with given timestamp in micrseconds. - /// - /// This constructor is used for unit test only. Real [FrameTiming]s should - /// be retrieved from [Window.onReportTimings]. - /// - /// TODO(CareF): This is part of #20229. Remove back to default constructor - /// after #20229 lands and corresponding framwork PRs land. - factory FrameTiming.fromTimeStamps({ - int? vsyncStart, - required int buildStart, - required int buildFinish, - required int rasterStart, - required int rasterFinish - }) { - return FrameTiming._([ - // This is for temporarily backward compatiblilty. - vsyncStart ?? buildStart, - buildStart, - buildFinish, - rasterStart, - rasterFinish - ]); - } - /// This is a raw timestamp in microseconds from some epoch. The epoch in all /// [FrameTiming] is the same, but it may not match [DateTime]'s epoch. int timestampInMicroseconds(FramePhase phase) => _timestamps[phase.index];