Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
63574cf7
Unverified
Commit
63574cf7
authored
Apr 26, 2022
by
Jonah Williams
Committed by
GitHub
Apr 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add benchmark for animated complex opacity (#102532)
parent
f15295cc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
0 deletions
+103
-0
.ci.yaml
.ci.yaml
+11
-0
TESTOWNERS
TESTOWNERS
+1
-0
AndroidManifest.xml
.../macrobenchmarks/android/app/src/main/AndroidManifest.xml
+1
-0
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-0
animated_complex_opacity.dart
...rks/macrobenchmarks/lib/src/animated_complex_opacity.dart
+59
-0
animated_complex_opacity_perf__e2e_summary.dart
...bin/tasks/animated_complex_opacity_perf__e2e_summary.dart
+14
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+7
-0
No files found.
.ci.yaml
View file @
63574cf7
...
...
@@ -1453,6 +1453,17 @@ targets:
task_name
:
animated_image_gc_perf
scheduler
:
luci
-
name
:
Linux_android animated_complex_opacity_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
bringup
:
true
timeout
:
60
properties
:
tags
:
>
["devicelab","android","linux"]
task_name
:
animated_complex_opacity_perf__e2e_summary
scheduler
:
luci
-
name
:
Linux_android animated_placeholder_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
...
...
TESTOWNERS
View file @
63574cf7
...
...
@@ -78,6 +78,7 @@
/dev/devicelab/bin/tasks/gradient_consistent_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/gradient_dynamic_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/gradient_static_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/animated_complex_opacity_perf__e2e_summary.dart @jonahwilliams @flutter/engine
## Windows Android DeviceLab tests
/dev/devicelab/bin/tasks/basic_material_app_win__compile.dart @zanderso @flutter/tool
...
...
dev/benchmarks/macrobenchmarks/android/app/src/main/AndroidManifest.xml
View file @
63574cf7
...
...
@@ -21,6 +21,7 @@ found in the LICENSE file. -->
android:label=
"macrobenchmarks"
android:icon=
"@mipmap/ic_launcher"
>
<activity
android:exported=
"true"
android:name=
".MainActivity"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
...
...
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
63574cf7
...
...
@@ -27,6 +27,7 @@ const String kAnimationWithMicrotasksRouteName = '/animation_with_microtasks';
const
String
kAnimatedImageRouteName
=
'/animated_image'
;
const
String
kOpacityPeepholeRouteName
=
'/opacity_peephole'
;
const
String
kGradientPerfRouteName
=
'/gradient_perf'
;
const
String
kAnimatedComplexOpacityPerfRouteName
=
'/animated_complex_opacity'
;
const
String
kOpacityPeepholeOneRectRouteName
=
'
$kOpacityPeepholeRouteName
/one_big_rect'
;
const
String
kOpacityPeepholeColumnOfOpacityRouteName
=
'
$kOpacityPeepholeRouteName
/column_of_opacity'
;
...
...
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
63574cf7
...
...
@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import
'common.dart'
;
import
'src/animated_complex_opacity.dart'
;
import
'src/animated_image.dart'
;
import
'src/animated_placeholder.dart'
;
import
'src/animation_with_microtasks.dart'
;
...
...
@@ -72,6 +73,7 @@ class MacrobenchmarksApp extends StatelessWidget {
...
opacityPeepholeRoutes
,
kGradientPerfRouteName:
(
BuildContext
context
)
=>
const
GradientPerfHomePage
(),
...
gradientPerfRoutes
,
kAnimatedComplexOpacityPerfRouteName:
(
BuildContext
context
)
=>
const
AnimatedComplexOpacity
(),
},
);
}
...
...
@@ -257,6 +259,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kGradientPerfRouteName
);
},
),
ElevatedButton
(
key:
const
Key
(
kAnimatedComplexOpacityPerfRouteName
),
child:
const
Text
(
'Animated complex opacity perf'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kAnimatedComplexOpacityPerfRouteName
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/animated_complex_opacity.dart
0 → 100644
View file @
63574cf7
// 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'
;
// Various tests to verify that Aniamted opacity layers (i.e. FadeTransition) do not
// dirty children even without explicit repaint boundaries. These intentionally use
// text to ensure we don't measure the opacity peephole case.
class
AnimatedComplexOpacity
extends
StatefulWidget
{
const
AnimatedComplexOpacity
({
super
.
key
});
@override
State
<
AnimatedComplexOpacity
>
createState
()
=>
_AnimatedComplexOpacityState
();
}
class
_AnimatedComplexOpacityState
extends
State
<
AnimatedComplexOpacity
>
with
SingleTickerProviderStateMixin
{
late
final
AnimationController
controller
=
AnimationController
(
vsync:
this
,
duration:
const
Duration
(
milliseconds:
5000
));
late
final
Animation
<
double
>
animation
=
controller
.
drive
(
Tween
<
double
>(
begin:
0.0
,
end:
1.0
));
@override
void
initState
()
{
super
.
initState
();
controller
.
forward
(
from:
0.0
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
home:
Scaffold
(
body:
ListView
(
children:
<
Widget
>[
for
(
int
i
=
0
;
i
<
20
;
i
++)
FadeTransition
(
opacity:
animation
,
child:
Center
(
child:
Transform
.
scale
(
scale:
1.01
,
child:
const
ModeratelyComplexWidget
()),
))
],
),
),
);
}
}
class
ModeratelyComplexWidget
extends
StatelessWidget
{
const
ModeratelyComplexWidget
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
const
Material
(
elevation:
10
,
clipBehavior:
Clip
.
hardEdge
,
child:
ListTile
(
leading:
Icon
(
Icons
.
abc
,
size:
24
),
title:
DecoratedBox
(
decoration:
BoxDecoration
(
color:
Colors
.
red
),
child:
Text
(
'Hello World'
)),
trailing:
FlutterLogo
(),
),
);
}
}
dev/devicelab/bin/tasks/animated_complex_opacity_perf__e2e_summary.dart
0 → 100644
View file @
63574cf7
// 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
'dart:async'
;
import
'package:flutter_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createAnimatedComplexOpacityPerfE2ETest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
63574cf7
...
...
@@ -577,6 +577,13 @@ TaskFunction createGradientStaticPerfE2ETest() {
).
run
;
}
TaskFunction
createAnimatedComplexOpacityPerfE2ETest
(
)
{
return
PerfTest
.
e2e
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test/animated_complex_opacity_perf_e2e.dart'
,
).
run
;
}
Map
<
String
,
dynamic
>
_average
(
List
<
Map
<
String
,
dynamic
>>
results
,
int
iterations
)
{
final
Map
<
String
,
dynamic
>
tally
=
<
String
,
dynamic
>{};
for
(
final
Map
<
String
,
dynamic
>
item
in
results
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment