Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the `engine` subdirectory and enforces that these files stay formatted with a presubmit check. **Reviewers:** Please carefully review all the commits except for the one titled "formatted". The "formatted" commit was auto-generated by running `dev/tools/format.sh -a -f`. The other commits were hand-crafted to prepare the repo for the formatting change. I recommend reviewing the commits one-by-one via the "Commits" tab and avoiding Github's "Files changed" tab as it will likely slow down your browser because of the size of this PR. --------- Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8e0993eda8
commit
5491c8c146
@@ -8,7 +8,12 @@ import '../common.dart';
|
||||
|
||||
const int _kNumIters = 10000;
|
||||
|
||||
void _testCurve(Curve curve, {required String name, required String description, required BenchmarkResultPrinter printer}) {
|
||||
void _testCurve(
|
||||
Curve curve, {
|
||||
required String name,
|
||||
required String description,
|
||||
required BenchmarkResultPrinter printer,
|
||||
}) {
|
||||
final Stopwatch watch = Stopwatch();
|
||||
print('$description benchmark...');
|
||||
watch.start();
|
||||
|
||||
@@ -11,7 +11,7 @@ import '../common.dart';
|
||||
const int _kNumIterations = 10000000;
|
||||
const int _kNumWarmUp = 100000;
|
||||
|
||||
Future<void> execute() async {
|
||||
Future<void> execute() async {
|
||||
assert(false, "Don't run benchmarks in debug mode! Use 'flutter run --release'.");
|
||||
print('MatrixUtils.transformRect and .transformPoint benchmark...');
|
||||
|
||||
@@ -24,14 +24,18 @@ Future<void> execute() async {
|
||||
}
|
||||
|
||||
final List<Matrix4> affineTransforms = <Matrix4>[
|
||||
Matrix4.identity()..scale(1.2, 1.3, 1.0)..rotateZ(0.1),
|
||||
Matrix4.identity()
|
||||
..scale(1.2, 1.3, 1.0)
|
||||
..rotateZ(0.1),
|
||||
Matrix4.identity()..translate(12.0, 13.0, 10.0),
|
||||
Matrix4.identity()..scale(1.2, 1.3, 1.0)..translate(12.0, 13.0, 10.0),
|
||||
Matrix4.identity()
|
||||
..scale(1.2, 1.3, 1.0)
|
||||
..translate(12.0, 13.0, 10.0),
|
||||
];
|
||||
final List<Matrix4> perspectiveTransforms = <Matrix4>[
|
||||
makePerspective(10.0, math.pi / 8.0, 0.3),
|
||||
makePerspective( 8.0, math.pi / 8.0, 0.2),
|
||||
makePerspective( 1.0, math.pi / 4.0, 0.1)..rotateX(0.1),
|
||||
makePerspective(8.0, math.pi / 8.0, 0.2),
|
||||
makePerspective(1.0, math.pi / 4.0, 0.1)..rotateX(0.1),
|
||||
];
|
||||
final List<Rect> rectangles = <Rect>[
|
||||
const Rect.fromLTRB(1.1, 1.2, 1.5, 1.8),
|
||||
|
||||
Reference in New Issue
Block a user