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
1e8e4147
Unverified
Commit
1e8e4147
authored
Feb 03, 2021
by
Michael Goderbauer
Committed by
GitHub
Feb 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "Migrate some benchmarks to NNBD (#75023)" (#75053)" (#75265)
parent
efd48792
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
28 deletions
+21
-28
main.dart
dev/benchmarks/platform_views_layout/lib/main.dart
+6
-8
pubspec.yaml
dev/benchmarks/platform_views_layout/pubspec.yaml
+1
-1
scroll_perf_test.dart
...s/platform_views_layout/test_driver/scroll_perf_test.dart
+2
-3
android_platform_view.dart
..._layout_hybrid_composition/lib/android_platform_view.dart
+3
-4
main.dart
...ks/platform_views_layout_hybrid_composition/lib/main.dart
+6
-8
pubspec.yaml
...rks/platform_views_layout_hybrid_composition/pubspec.yaml
+1
-1
scroll_perf_test.dart
...yout_hybrid_composition/test_driver/scroll_perf_test.dart
+2
-3
No files found.
dev/benchmarks/platform_views_layout/lib/main.dart
View file @
1e8e4147
...
@@ -15,13 +15,11 @@ void main() {
...
@@ -15,13 +15,11 @@ void main() {
class
PlatformViewApp
extends
StatefulWidget
{
class
PlatformViewApp
extends
StatefulWidget
{
const
PlatformViewApp
({
const
PlatformViewApp
({
Key
key
Key
?
key
,
})
:
super
(
key:
key
);
})
:
super
(
key:
key
);
@override
@override
PlatformViewAppState
createState
()
=>
PlatformViewAppState
();
PlatformViewAppState
createState
()
=>
PlatformViewAppState
();
static
PlatformViewAppState
of
(
BuildContext
context
)
=>
context
.
findAncestorStateOfType
<
PlatformViewAppState
>();
}
}
class
PlatformViewAppState
extends
State
<
PlatformViewApp
>
{
class
PlatformViewAppState
extends
State
<
PlatformViewApp
>
{
...
@@ -42,7 +40,7 @@ class PlatformViewAppState extends State<PlatformViewApp> {
...
@@ -42,7 +40,7 @@ class PlatformViewAppState extends State<PlatformViewApp> {
}
}
class
PlatformViewLayout
extends
StatelessWidget
{
class
PlatformViewLayout
extends
StatelessWidget
{
const
PlatformViewLayout
({
Key
key
})
:
super
(
key:
key
);
const
PlatformViewLayout
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -72,12 +70,12 @@ class PlatformViewLayout extends StatelessWidget {
...
@@ -72,12 +70,12 @@ class PlatformViewLayout extends StatelessWidget {
}
}
class
DummyPlatformView
extends
StatelessWidget
{
class
DummyPlatformView
extends
StatelessWidget
{
const
DummyPlatformView
({
Key
key
})
:
super
(
key:
key
);
const
DummyPlatformView
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
const
String
viewType
=
'benchmarks/platform_views_layout/DummyPlatformView'
;
const
String
viewType
=
'benchmarks/platform_views_layout/DummyPlatformView'
;
Widget
nativeView
;
late
Widget
nativeView
;
if
(
Platform
.
isIOS
)
{
if
(
Platform
.
isIOS
)
{
nativeView
=
const
UiKitView
(
nativeView
=
const
UiKitView
(
viewType:
viewType
,
viewType:
viewType
,
...
@@ -98,7 +96,7 @@ class DummyPlatformView extends StatelessWidget {
...
@@ -98,7 +96,7 @@ class DummyPlatformView extends StatelessWidget {
}
}
class
RotationContainer
extends
StatefulWidget
{
class
RotationContainer
extends
StatefulWidget
{
const
RotationContainer
({
Key
key
})
:
super
(
key:
key
);
const
RotationContainer
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
_RotationContainerState
createState
()
=>
_RotationContainerState
();
_RotationContainerState
createState
()
=>
_RotationContainerState
();
...
@@ -106,7 +104,7 @@ class RotationContainer extends StatefulWidget {
...
@@ -106,7 +104,7 @@ class RotationContainer extends StatefulWidget {
class
_RotationContainerState
extends
State
<
RotationContainer
>
class
_RotationContainerState
extends
State
<
RotationContainer
>
with
SingleTickerProviderStateMixin
{
with
SingleTickerProviderStateMixin
{
AnimationController
_rotationController
;
late
AnimationController
_rotationController
;
@override
@override
void
initState
()
{
void
initState
()
{
...
...
dev/benchmarks/platform_views_layout/pubspec.yaml
View file @
1e8e4147
...
@@ -2,7 +2,7 @@ name: platform_views_layout
...
@@ -2,7 +2,7 @@ name: platform_views_layout
description
:
A benchmark for platform views.
description
:
A benchmark for platform views.
environment
:
environment
:
sdk
:
"
>=2.
2.
0
<3.0.0"
sdk
:
"
>=2.
12.0-
0
<3.0.0"
dependencies
:
dependencies
:
flutter
:
flutter
:
...
...
dev/benchmarks/platform_views_layout/test_driver/scroll_perf_test.dart
View file @
1e8e4147
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
group
(
'scrolling performance test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
@@ -16,7 +16,6 @@ void main() {
...
@@ -16,7 +16,6 @@ void main() {
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
if
(
driver
!=
null
)
driver
.
close
();
driver
.
close
();
});
});
...
...
dev/benchmarks/platform_views_layout_hybrid_composition/lib/android_platform_view.dart
View file @
1e8e4147
...
@@ -12,10 +12,9 @@ class AndroidPlatformView extends StatelessWidget {
...
@@ -12,10 +12,9 @@ class AndroidPlatformView extends StatelessWidget {
/// Creates a platform view for Android, which is rendered as a
/// Creates a platform view for Android, which is rendered as a
/// native view.
/// native view.
const
AndroidPlatformView
({
const
AndroidPlatformView
({
Key
key
,
Key
?
key
,
@required
this
.
viewType
,
required
this
.
viewType
,
})
:
assert
(
viewType
!=
null
),
})
:
super
(
key:
key
);
super
(
key:
key
);
/// The unique identifier for the view type to be embedded by this widget.
/// The unique identifier for the view type to be embedded by this widget.
///
///
...
...
dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart
View file @
1e8e4147
...
@@ -19,13 +19,11 @@ void main() {
...
@@ -19,13 +19,11 @@ void main() {
class
PlatformViewApp
extends
StatefulWidget
{
class
PlatformViewApp
extends
StatefulWidget
{
const
PlatformViewApp
({
const
PlatformViewApp
({
Key
key
Key
?
key
})
:
super
(
key:
key
);
})
:
super
(
key:
key
);
@override
@override
PlatformViewAppState
createState
()
=>
PlatformViewAppState
();
PlatformViewAppState
createState
()
=>
PlatformViewAppState
();
static
PlatformViewAppState
of
(
BuildContext
context
)
=>
context
.
findAncestorStateOfType
<
PlatformViewAppState
>();
}
}
class
PlatformViewAppState
extends
State
<
PlatformViewApp
>
{
class
PlatformViewAppState
extends
State
<
PlatformViewApp
>
{
...
@@ -46,7 +44,7 @@ class PlatformViewAppState extends State<PlatformViewApp> {
...
@@ -46,7 +44,7 @@ class PlatformViewAppState extends State<PlatformViewApp> {
}
}
class
PlatformViewLayout
extends
StatelessWidget
{
class
PlatformViewLayout
extends
StatelessWidget
{
const
PlatformViewLayout
({
Key
key
})
:
super
(
key:
key
);
const
PlatformViewLayout
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -76,12 +74,12 @@ class PlatformViewLayout extends StatelessWidget {
...
@@ -76,12 +74,12 @@ class PlatformViewLayout extends StatelessWidget {
}
}
class
DummyPlatformView
extends
StatelessWidget
{
class
DummyPlatformView
extends
StatelessWidget
{
const
DummyPlatformView
({
Key
key
})
:
super
(
key:
key
);
const
DummyPlatformView
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
const
String
viewType
=
'benchmarks/platform_views_layout_hybrid_composition/DummyPlatformView'
;
const
String
viewType
=
'benchmarks/platform_views_layout_hybrid_composition/DummyPlatformView'
;
Widget
nativeView
;
late
Widget
nativeView
;
if
(
Platform
.
isIOS
)
{
if
(
Platform
.
isIOS
)
{
nativeView
=
const
UiKitView
(
nativeView
=
const
UiKitView
(
viewType:
viewType
,
viewType:
viewType
,
...
@@ -103,7 +101,7 @@ class DummyPlatformView extends StatelessWidget {
...
@@ -103,7 +101,7 @@ class DummyPlatformView extends StatelessWidget {
}
}
class
RotationContainer
extends
StatefulWidget
{
class
RotationContainer
extends
StatefulWidget
{
const
RotationContainer
({
Key
key
})
:
super
(
key:
key
);
const
RotationContainer
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
_RotationContainerState
createState
()
=>
_RotationContainerState
();
_RotationContainerState
createState
()
=>
_RotationContainerState
();
...
@@ -111,7 +109,7 @@ class RotationContainer extends StatefulWidget {
...
@@ -111,7 +109,7 @@ class RotationContainer extends StatefulWidget {
class
_RotationContainerState
extends
State
<
RotationContainer
>
class
_RotationContainerState
extends
State
<
RotationContainer
>
with
SingleTickerProviderStateMixin
{
with
SingleTickerProviderStateMixin
{
AnimationController
_rotationController
;
late
AnimationController
_rotationController
;
@override
@override
void
initState
()
{
void
initState
()
{
...
...
dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml
View file @
1e8e4147
...
@@ -2,7 +2,7 @@ name: platform_views_layout_hybrid_composition
...
@@ -2,7 +2,7 @@ name: platform_views_layout_hybrid_composition
description
:
A benchmark for platform views, using hybrid composition on android.
description
:
A benchmark for platform views, using hybrid composition on android.
environment
:
environment
:
sdk
:
"
>=2.
2.
0
<3.0.0"
sdk
:
"
>=2.
12.0-
0
<3.0.0"
dependencies
:
dependencies
:
flutter
:
flutter
:
...
...
dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/scroll_perf_test.dart
View file @
1e8e4147
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
group
(
'scrolling performance test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
@@ -16,7 +16,6 @@ void main() {
...
@@ -16,7 +16,6 @@ void main() {
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
if
(
driver
!=
null
)
driver
.
close
();
driver
.
close
();
});
});
...
...
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