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
c5318f7f
Unverified
Commit
c5318f7f
authored
Jun 03, 2020
by
Dan Field
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make debugSemantics available to profile mode (#58620)
parent
e216eec7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
transitions_perf_test.dart
...ts/flutter_gallery/test_driver/transitions_perf_test.dart
+8
-2
object.dart
packages/flutter/lib/src/rendering/object.dart
+5
-7
No files found.
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
c5318f7f
...
...
@@ -190,6 +190,7 @@ Future<void> runDemos(List<String> demos, FlutterDriver driver) async {
}
void
main
(
[
List
<
String
>
args
=
const
<
String
>[]])
{
final
bool
withSemantics
=
args
.
contains
(
'--with_semantics'
);
group
(
'flutter gallery transitions'
,
()
{
FlutterDriver
driver
;
setUpAll
(()
async
{
...
...
@@ -197,8 +198,7 @@ void main([List<String> args = const <String>[]]) {
// Wait for the first frame to be rasterized.
await
driver
.
waitUntilFirstFrameRasterized
();
if
(
args
.
contains
(
'--with_semantics'
))
{
if
(
withSemantics
)
{
print
(
'Enabeling semantics...'
);
await
driver
.
setSemantics
(
true
);
}
...
...
@@ -214,6 +214,12 @@ void main([List<String> args = const <String>[]]) {
await
driver
.
close
();
});
test
(
'find.bySemanticsLabel'
,
()
async
{
// Assert that we can use semantics related finders in profile mode.
final
int
id
=
await
driver
.
getSemanticsId
(
find
.
bySemanticsLabel
(
'Material'
));
expect
(
id
,
greaterThan
(-
1
));
},
skip:
!
withSemantics
);
test
(
'all demos'
,
()
async
{
// Collect timeline data for just a limited set of demos to avoid OOMs.
final
Timeline
timeline
=
await
driver
.
traceAction
(
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
c5318f7f
...
...
@@ -2482,15 +2482,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// render objects in production, obtain a [SemanticsHandle] from
/// [PipelineOwner.ensureSemantics].
///
/// Only valid
when asserts are enabled
. In release builds, always returns
/// Only valid
in debug and profile mode
. In release builds, always returns
/// null.
SemanticsNode
get
debugSemantics
{
SemanticsNode
result
;
assert
(()
{
result
=
_semantics
;
return
true
;
}());
return
result
;
if
(!
kReleaseMode
)
{
return
_semantics
;
}
return
null
;
}
/// Removes all semantics from this render object and its descendants.
...
...
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