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
54dbbd76
Unverified
Commit
54dbbd76
authored
Mar 31, 2023
by
Jonah Williams
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devicelab] add regular old blur benchmark (#123879)
[devicelab] add regular old blur benchmark
parent
db5434e5
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
174 additions
and
2 deletions
+174
-2
.ci.yaml
.ci.yaml
+20
-0
TESTOWNERS
TESTOWNERS
+2
-0
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-1
animated_blur_backdrop_filter.dart
...acrobenchmarks/lib/src/animated_blur_backdrop_filter.dart
+84
-0
animated_blur_backdrop_filter_perf_test.dart
.../test_driver/animated_blur_backdrop_filter_perf_test.dart
+16
-0
util.dart
dev/benchmarks/macrobenchmarks/test_driver/util.dart
+1
-1
animated_blur_backdrop_filter_perf__timeline_summary.dart
...animated_blur_backdrop_filter_perf__timeline_summary.dart
+14
-0
animated_blur_backdrop_filter_perf_ios__timeline_summary.dart
...ated_blur_backdrop_filter_perf_ios__timeline_summary.dart
+14
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+13
-0
No files found.
.ci.yaml
View file @
54dbbd76
...
...
@@ -2439,6 +2439,16 @@ targets:
["devicelab", "android", "linux"]
task_name
:
android_choreographer_do_frame_test
-
name
:
Linux_android animated_blur_backdrop_filter_perf__timeline_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
timeout
:
60
bringup
:
true
properties
:
tags
:
>
["devicelab", "android", "linux"]
task_name
:
animated_blur_backdrop_filter_perf__timeline_summary
-
name
:
Staging_build_linux analyze
presubmit
:
false
bringup
:
true
...
...
@@ -4049,6 +4059,16 @@ targets:
["devicelab", "ios", "mac"]
task_name
:
flutter_gallery__transition_perf_e2e_impeller_ios
-
name
:
Mac_ios animated_blur_backdrop_filter_perf_ios__timeline_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
timeout
:
60
bringup
:
true
properties
:
tags
:
>
["devicelab", "ios", "mac"]
task_name
:
animated_blur_backdrop_filter_perf_ios__timeline_summary
-
name
:
Mac_ios spell_check_test
recipe
:
devicelab/devicelab_drone
presubmit
:
false
...
...
TESTOWNERS
View file @
54dbbd76
...
...
@@ -89,6 +89,7 @@
/dev/devicelab/bin/tasks/textfield_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/web_size__compile_test.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/wide_gamut_ios.dart @gaaclarke @flutter/engine
/dev/devicelab/bin/tasks/animated_blur_backdrop_filter_perf__timeline_summary.dart @jonahwilliams @flutter/engine
## Windows Android DeviceLab tests
/dev/devicelab/bin/tasks/basic_material_app_win__compile.dart @zanderso @flutter/tool
...
...
@@ -208,6 +209,7 @@
/dev/devicelab/bin/tasks/simple_animation_perf_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/tiles_scroll_perf_impeller_ios__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/tiles_scroll_perf_ios__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/animated_blur_backdrop_filter_perf_ios__timeline_summary.dart @jonahwilliams @flutter/engine
## Host only DeviceLab tests
/dev/devicelab/bin/tasks/animated_complex_opacity_perf_macos__e2e_summary.dart @cbracken @flutter/desktop
...
...
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
54dbbd76
...
...
@@ -33,6 +33,7 @@ const String kGradientPerfRouteName = '/gradient_perf';
const
String
kAnimatedComplexOpacityPerfRouteName
=
'/animated_complex_opacity'
;
const
String
kAnimatedComplexImageFilteredPerfRouteName
=
'/animated_complex_image_filtered'
;
const
String
kListTextLayoutRouteName
=
'/list_text_layout'
;
const
String
kAnimatedBlurBackdropFilter
=
'/animated_blur_backdrop_filter'
;
const
String
kOpacityPeepholeOneRectRouteName
=
'
$kOpacityPeepholeRouteName
/one_big_rect'
;
const
String
kOpacityPeepholeColumnOfOpacityRouteName
=
'
$kOpacityPeepholeRouteName
/column_of_opacity'
;
...
...
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
54dbbd76
...
...
@@ -5,7 +5,7 @@
import
'package:flutter/material.dart'
;
import
'common.dart'
;
import
'src/animated_blur_backdrop_filter.dart'
;
import
'src/animated_complex_image_filtered.dart'
;
import
'src/animated_complex_opacity.dart'
;
import
'src/animated_image.dart'
;
...
...
@@ -84,6 +84,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kAnimatedComplexOpacityPerfRouteName:
(
BuildContext
context
)
=>
const
AnimatedComplexOpacity
(),
kListTextLayoutRouteName:
(
BuildContext
context
)
=>
const
ColumnOfText
(),
kAnimatedComplexImageFilteredPerfRouteName:
(
BuildContext
context
)
=>
const
AnimatedComplexImageFiltered
(),
kAnimatedBlurBackdropFilter:
(
BuildContext
context
)
=>
const
AnimatedBlurBackdropFilter
(),
},
);
}
...
...
@@ -311,6 +312,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kListTextLayoutRouteName
);
},
),
ElevatedButton
(
key:
const
Key
(
kAnimatedBlurBackdropFilter
),
child:
const
Text
(
'An animating backdrop filter'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kAnimatedBlurBackdropFilter
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/animated_blur_backdrop_filter.dart
0 → 100644
View file @
54dbbd76
// 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:ui'
as
ui
;
import
'package:flutter/material.dart'
;
// Various tests to verify that animated image filtered layers do not
// dirty children even without explicit repaint boundaries. These intentionally use
// text to ensure we don't measure the opacity peephole case.
class
AnimatedBlurBackdropFilter
extends
StatefulWidget
{
const
AnimatedBlurBackdropFilter
({
super
.
key
});
@override
State
<
AnimatedBlurBackdropFilter
>
createState
()
=>
_AnimatedBlurBackdropFilterState
();
}
class
_AnimatedBlurBackdropFilterState
extends
State
<
AnimatedBlurBackdropFilter
>
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
));
ui
.
ImageFilter
imageFilter
=
ui
.
ImageFilter
.
blur
();
@override
void
initState
()
{
super
.
initState
();
controller
.
repeat
();
animation
.
addListener
(()
{
setState
(()
{
imageFilter
=
ui
.
ImageFilter
.
blur
(
sigmaX:
animation
.
value
*
16
,
sigmaY:
animation
.
value
*
16
,
tileMode:
TileMode
.
decal
,
);
});
});
}
@override
void
dispose
()
{
controller
.
dispose
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
home:
Scaffold
(
body:
Stack
(
children:
<
Widget
>[
ListView
(
children:
<
Widget
>[
for
(
int
i
=
0
;
i
<
30
;
i
++)
Center
(
child:
Transform
.
scale
(
scale:
1.01
,
child:
const
ModeratelyComplexWidget
()),
),
],
),
BackdropFilter
(
filter:
imageFilter
,
child:
const
SizedBox
.
expand
(),
),
],
),
),
);
}
}
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/benchmarks/macrobenchmarks/test_driver/animated_blur_backdrop_filter_perf_test.dart
0 → 100644
View file @
54dbbd76
// 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:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTest
(
'animated_blur_backdrop_filter_perf'
,
kAnimatedBlurBackdropFilter
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
10
),
);
}
dev/benchmarks/macrobenchmarks/test_driver/util.dart
View file @
54dbbd76
...
...
@@ -23,7 +23,7 @@ Future<void> runDriverTestForRoute(String routeName, DriverTestCallBack body) as
expect
(
scrollable
,
isNotNull
);
final
SerializableFinder
button
=
find
.
byValueKey
(
routeName
);
expect
(
button
,
isNotNull
);
await
driver
.
scrollUntilVisible
(
scrollable
,
button
,
dyScroll:
-
5
0.0
);
await
driver
.
scrollUntilVisible
(
scrollable
,
button
,
dyScroll:
-
10
0.0
);
await
driver
.
tap
(
button
);
await
body
(
driver
);
...
...
dev/devicelab/bin/tasks/animated_blur_backdrop_filter_perf__timeline_summary.dart
0 → 100644
View file @
54dbbd76
// 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
(
createAnimatedBlurBackropFilterPerfTest
(
enableImpeller:
true
));
}
dev/devicelab/bin/tasks/animated_blur_backdrop_filter_perf_ios__timeline_summary.dart
0 → 100644
View file @
54dbbd76
// 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
.
ios
;
await
task
(
createAnimatedBlurBackropFilterPerfTest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
54dbbd76
...
...
@@ -620,6 +620,19 @@ TaskFunction createGradientStaticPerfE2ETest() {
).
run
;
}
TaskFunction
createAnimatedBlurBackropFilterPerfTest
(
{
bool
enableImpeller
=
false
,
})
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/run_app.dart'
,
'animated_blur_backdrop_filter_perf'
,
enableImpeller:
enableImpeller
,
testDriver:
'test_driver/animated_blur_backdrop_filter_perf_test.dart'
,
saveTraceFile:
true
,
).
run
;
}
TaskFunction
createAnimatedComplexOpacityPerfE2ETest
(
{
bool
enableImpeller
=
false
,
})
{
...
...
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