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
cadde245
Unverified
Commit
cadde245
authored
Apr 11, 2019
by
Jonah Williams
Committed by
GitHub
Apr 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toggle for debugProfileWidgetBuilds (#30867)
parent
b4edfb15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+18
-0
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
cadde245
...
...
@@ -287,6 +287,12 @@ class FlutterDevice {
await
view
.
uiIsolate
.
flutterToggleWidgetInspector
();
}
Future
<
void
>
toggleProfileWidgetBuilds
()
async
{
for
(
FlutterView
view
in
views
)
{
await
view
.
uiIsolate
.
flutterToggleProfileWidgetBuilds
();
}
}
Future
<
String
>
togglePlatform
({
String
from
})
async
{
String
to
;
switch
(
from
)
{
...
...
@@ -643,6 +649,13 @@ abstract class ResidentRunner {
await
device
.
toggleWidgetInspector
();
}
Future
<
void
>
_debugToggleProfileWidgetBuilds
()
async
{
await
refreshViews
();
for
(
FlutterDevice
device
in
flutterDevices
)
{
await
device
.
toggleProfileWidgetBuilds
();
}
}
Future
<
void
>
_screenshot
(
FlutterDevice
device
)
async
{
final
Status
status
=
logger
.
startProgress
(
'Taking screenshot for
${device.device.name}
...'
,
timeout:
timeoutConfiguration
.
fastOperation
);
final
File
outputFile
=
getUniqueFile
(
fs
.
currentDirectory
,
'flutter'
,
'png'
);
...
...
@@ -870,6 +883,10 @@ abstract class ResidentRunner {
await
_screenshot
(
device
);
}
return
true
;
}
else
if
(
character
==
'a'
)
{
if
(
supportsServiceProtocol
&&
isRunningDebug
)
{
await
_debugToggleProfileWidgetBuilds
();
}
}
else
if
(
lower
==
'o'
)
{
if
(
supportsServiceProtocol
&&
isRunningDebug
)
{
await
_debugTogglePlatform
();
...
...
@@ -976,6 +993,7 @@ abstract class ResidentRunner {
printStatus
(
'To toggle the widget inspector (WidgetsApp.showWidgetInspectorOverride), press "i".'
);
printStatus
(
'To toggle the display of construction lines (debugPaintSizeEnabled), press "p".'
);
printStatus
(
'To simulate different operating systems, (defaultTargetPlatform), press "o".'
);
printStatus
(
'To enable timeline events for all widget build methods, (debugProfileWidgetBuilds), press "a"'
);
printStatus
(
'To toggle the elevation checker, press "z".'
);
}
else
{
printStatus
(
'To dump the accessibility tree (debugDumpSemantics), press "S" (for traversal order) or "U" (for inverse hit test order).'
);
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
cadde245
...
...
@@ -1289,6 +1289,8 @@ class Isolate extends ServiceObjectOwner {
Future
<
Map
<
String
,
dynamic
>>
flutterToggleWidgetInspector
()
=>
_flutterToggle
(
'inspector.show'
);
Future
<
Map
<
String
,
dynamic
>>
flutterToggleProfileWidgetBuilds
()
=>
_flutterToggle
(
'profileWidgetBuilds'
);
Future
<
Map
<
String
,
dynamic
>>
flutterDebugAllowBanner
(
bool
show
)
{
return
invokeFlutterExtensionRpcRaw
(
'ext.flutter.debugAllowBanner'
,
...
...
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