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
7261b98e
Unverified
Commit
7261b98e
authored
May 31, 2020
by
Jim Graham
Committed by
GitHub
May 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling the ImageFiltered(ImageFilter.matrix) page of macrobenchmark (#58277)
parent
309e0aa4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
2 deletions
+73
-2
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+3
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-0
filtered_child_animation.dart
...rks/macrobenchmarks/lib/src/filtered_child_animation.dart
+1
-2
imagefiltered_transform_animation_perf.dart
...s/test_driver/imagefiltered_transform_animation_perf.dart
+11
-0
imagefiltered_transform_animation_perf_test.dart
...t_driver/imagefiltered_transform_animation_perf_test.dart
+16
-0
util.dart
dev/benchmarks/macrobenchmarks/test_driver/util.dart
+5
-0
imagefiltered_transform_animation_perf__timeline_summary.dart
...efiltered_transform_animation_perf__timeline_summary.dart
+14
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+8
-0
manifest.yaml
dev/devicelab/manifest.yaml
+6
-0
No files found.
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
7261b98e
...
...
@@ -13,3 +13,6 @@ const String kTextRouteName = '/text';
const
String
kAnimatedPlaceholderRouteName
=
'/animated_placeholder'
;
const
String
kColorFilterAndFadeRouteName
=
'/color_filter_and_fade'
;
const
String
kFadingChildAnimationRouteName
=
'/fading_child_animation'
;
const
String
kImageFilteredTransformAnimationRouteName
=
'/imagefiltered_transform_animation'
;
const
String
kScrollableName
=
'/macrobenchmark_listview'
;
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
7261b98e
...
...
@@ -42,6 +42,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kAnimatedPlaceholderRouteName:
(
BuildContext
context
)
=>
AnimatedPlaceholderPage
(),
kColorFilterAndFadeRouteName:
(
BuildContext
context
)
=>
ColorFilterAndFadePage
(),
kFadingChildAnimationRouteName:
(
BuildContext
context
)
=>
const
FilteredChildAnimationPage
(
FilterType
.
opacity
),
kImageFilteredTransformAnimationRouteName:
(
BuildContext
context
)
=>
const
FilteredChildAnimationPage
(
FilterType
.
rotateFilter
),
},
);
}
...
...
@@ -55,6 +56,7 @@ class HomePage extends StatelessWidget {
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
kMacrobenchmarks
)),
body:
ListView
(
key:
const
Key
(
kScrollableName
),
children:
<
Widget
>[
RaisedButton
(
key:
const
Key
(
kCullOpacityRouteName
),
...
...
@@ -133,6 +135,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kFadingChildAnimationRouteName
);
},
),
RaisedButton
(
key:
const
Key
(
kImageFilteredTransformAnimationRouteName
),
child:
const
Text
(
'ImageFiltered Transform Animation'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kImageFilteredTransformAnimationRouteName
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/filtered_child_animation.dart
View file @
7261b98e
...
...
@@ -42,8 +42,7 @@ class _FilteredChildAnimationPageState extends State<FilteredChildAnimationPage>
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
RenderBox
childBox
=
_childKey
.
currentContext
.
findRenderObject
()
as
RenderBox
;
final
Offset
localCenter
=
childBox
.
paintBounds
.
center
;
_childCenter
=
childBox
.
localToGlobal
(
localCenter
);
_childCenter
=
childBox
.
paintBounds
.
center
;
});
_controller
=
AnimationController
(
vsync:
this
,
duration:
const
Duration
(
seconds:
2
));
_controller
.
repeat
();
...
...
dev/benchmarks/macrobenchmarks/test_driver/imagefiltered_transform_animation_perf.dart
0 → 100644
View file @
7261b98e
// 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_driver/driver_extension.dart'
;
import
'package:macrobenchmarks/main.dart'
as
app
;
void
main
(
)
{
enableFlutterDriverExtension
();
app
.
main
();
}
dev/benchmarks/macrobenchmarks/test_driver/imagefiltered_transform_animation_perf_test.dart
0 → 100644
View file @
7261b98e
// 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
(
'imagefiltered_transform_animation_perf'
,
kImageFilteredTransformAnimationRouteName
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
10
),
);
}
dev/benchmarks/macrobenchmarks/test_driver/util.dart
View file @
7261b98e
...
...
@@ -7,6 +7,8 @@ import 'dart:async';
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
import
'package:macrobenchmarks/common.dart'
;
void
macroPerfTest
(
String
testName
,
String
routeName
,
...
...
@@ -27,8 +29,11 @@ void macroPerfTest(
await
driver
.
forceGC
();
final
SerializableFinder
scrollable
=
find
.
byValueKey
(
kScrollableName
);
expect
(
scrollable
,
isNotNull
);
final
SerializableFinder
button
=
find
.
byValueKey
(
routeName
);
expect
(
button
,
isNotNull
);
await
driver
.
scrollUntilVisible
(
scrollable
,
button
,
dyScroll:
-
50.0
);
await
driver
.
tap
(
button
);
if
(
pageDelay
!=
null
)
{
...
...
dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf__timeline_summary.dart
0 → 100644
View file @
7261b98e
// 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/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createImageFilteredTransformAnimationPerfTest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
7261b98e
...
...
@@ -217,6 +217,14 @@ TaskFunction createFadingChildAnimationPerfTest() {
).
run
;
}
TaskFunction
createImageFilteredTransformAnimationPerfTest
(
)
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/imagefiltered_transform_animation_perf.dart'
,
'imagefiltered_transform_animation_perf'
,
).
run
;
}
/// Measure application startup performance.
class
StartupTest
{
const
StartupTest
(
this
.
testDirectory
,
{
this
.
reportMetrics
=
true
});
...
...
dev/devicelab/manifest.yaml
View file @
7261b98e
...
...
@@ -213,6 +213,12 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
imagefiltered_transform_animation_perf__timeline_summary
:
description
:
>
Measures the runtime performance of imagefiltered widget with transform on Android.
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
flavors_test
:
description
:
>
Checks that flavored builds work on Android.
...
...
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