Let Flutter SDK use cupertino_icons 1.0.0 (#65087)

This commit is contained in:
xster
2020-10-16 22:36:01 -07:00
committed by GitHub
parent d2d072199b
commit 3302a12b20
25 changed files with 207 additions and 264 deletions

View File

@@ -1,48 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:gallery/benchmarks/gallery_automator.dart';
import 'package:macrobenchmarks/src/web/recorder.dart';
/// A recorder that measures frame building durations for the Gallery.
class GalleryRecorder extends WidgetRecorder {
GalleryRecorder({
@required this.benchmarkName,
this.shouldRunPredicate,
this.testScrollsOnly = false,
}) : assert(testScrollsOnly || shouldRunPredicate != null),
super(name: benchmarkName, useCustomWarmUp: true);
/// The name of the gallery benchmark to be run.
final String benchmarkName;
/// A function that accepts the name of a demo and returns whether we should
/// run this demo in this benchmark.
final bool Function(String) shouldRunPredicate;
/// Whether this benchmark only tests scrolling.
final bool testScrollsOnly;
/// Whether we should continue recording.
@override
bool shouldContinue() => !_finished || profile.shouldContinue();
GalleryAutomator _galleryAutomator;
bool get _finished => _galleryAutomator?.finished ?? false;
/// Creates the [GalleryAutomator] widget.
@override
Widget createWidget() {
_galleryAutomator = GalleryAutomator(
benchmarkName: benchmarkName,
shouldRunPredicate: shouldRunPredicate,
testScrollsOnly: testScrollsOnly,
stopWarmingUpCallback: profile.stopWarmingUp,
);
return _galleryAutomator.createWidget();
}
}

View File

@@ -10,8 +10,6 @@ import 'dart:math' as math;
import 'package:macrobenchmarks/src/web/bench_text_layout.dart';
import 'package:macrobenchmarks/src/web/bench_text_out_of_picture_bounds.dart';
import 'package:gallery/benchmarks/gallery_automator.dart' show DemoType, typeOfDemo;
import 'src/web/bench_build_image.dart';
import 'src/web/bench_build_material_checkbox.dart';
import 'src/web/bench_card_infinite_scroll.dart';
@@ -26,15 +24,12 @@ import 'src/web/bench_paths.dart';
import 'src/web/bench_picture_recording.dart';
import 'src/web/bench_simple_lazy_text_scroll.dart';
import 'src/web/bench_text_out_of_picture_bounds.dart';
import 'src/web/gallery/gallery_recorder.dart';
import 'src/web/recorder.dart';
typedef RecorderFactory = Recorder Function();
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA', defaultValue: false);
const String _galleryBenchmarkPrefix = 'gallery_v2';
/// List of all benchmarks that run in the devicelab.
///
/// When adding a new benchmark, add it to this map. Make sure that the name
@@ -67,27 +62,6 @@ final Map<String, RecorderFactory> benchmarks = <String, RecorderFactory>{
BenchTextCachedLayout.canvasBenchmarkName: () => BenchTextCachedLayout(useCanvas: true),
BenchBuildColorsGrid.domBenchmarkName: () => BenchBuildColorsGrid.dom(),
BenchBuildColorsGrid.canvasBenchmarkName: () => BenchBuildColorsGrid.canvas(),
// The following benchmark is for the Flutter Gallery.
// This benchmark is failing when run with CanvasKit, so we skip it
// for now.
// TODO(yjbanov): https://github.com/flutter/flutter/issues/59082
'${_galleryBenchmarkPrefix}_studies_perf': () => GalleryRecorder(
benchmarkName: '${_galleryBenchmarkPrefix}_studies_perf',
shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.study,
),
'${_galleryBenchmarkPrefix}_unanimated_perf': () => GalleryRecorder(
benchmarkName: '${_galleryBenchmarkPrefix}_unanimated_perf',
shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.unanimatedWidget,
),
'${_galleryBenchmarkPrefix}_animated_perf': () => GalleryRecorder(
benchmarkName: '${_galleryBenchmarkPrefix}_animated_perf',
shouldRunPredicate: (String demo) => typeOfDemo(demo) == DemoType.animatedWidget,
),
'${_galleryBenchmarkPrefix}_scroll_perf': () => GalleryRecorder(
benchmarkName: '${_galleryBenchmarkPrefix}_scroll_perf',
testScrollsOnly: true,
),
},
};