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
b9eb3f71
Unverified
Commit
b9eb3f71
authored
Oct 24, 2019
by
Jonah Williams
Committed by
GitHub
Oct 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Enable dump-skp-on-shader-compilation in drive (#43022)" (#43438)
This reverts commit
4f385c8f
.
parent
db041de6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
120 deletions
+9
-120
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+0
-1
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+9
-11
drive_test.dart
...lutter_tools/test/commands.shard/hermetic/drive_test.dart
+0
-108
No files found.
packages/flutter_tools/lib/src/commands/drive.dart
View file @
b9eb3f71
...
...
@@ -276,7 +276,6 @@ Future<LaunchResult> _startApp(DriveCommand command) async {
observatoryPort:
command
.
observatoryPort
,
verboseSystemLogs:
command
.
verboseSystemLogs
,
cacheSkSL:
command
.
cacheSkSL
,
dumpSkpOnShaderCompilation:
command
.
dumpSkpOnShaderCompilation
,
),
platformArgs:
platformArgs
,
prebuiltApplication:
!
command
.
shouldBuild
,
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
b9eb3f71
...
...
@@ -43,15 +43,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
)
..
addFlag
(
'cache-sksl'
,
negatable:
false
,
help:
'Only cache the shader in SkSL instead of binary or GLSL.'
,
)
..
addFlag
(
'dump-skp-on-shader-compilation'
,
negatable:
false
,
help:
'Automatically dump the skp that triggers new shader compilations. '
'This is useful for wrting custom ShaderWarmUp to reduce jank. '
'By default, this is not enabled to reduce the overhead. '
'This is only available in profile or debug build. '
,
)
help:
'Only cache the shader in SkSL instead of binary or GLSL.'
,)
..
addOption
(
'route'
,
help:
'Which route to load when running the app.'
,
)
...
...
@@ -71,7 +63,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
bool
get
traceStartup
=>
argResults
[
'trace-startup'
];
bool
get
cacheSkSL
=>
argResults
[
'cache-sksl'
];
bool
get
dumpSkpOnShaderCompilation
=>
argResults
[
'dump-skp-on-shader-compilation'
];
String
get
route
=>
argResults
[
'route'
];
}
...
...
@@ -107,6 +98,13 @@ class RunCommand extends RunCommandBase {
help:
'Enable tracing to the system tracer. This is only useful on '
'platforms where such a tracer is available (Android and Fuchsia).'
,
)
..
addFlag
(
'dump-skp-on-shader-compilation'
,
negatable:
false
,
help:
'Automatically dump the skp that triggers new shader compilations. '
'This is useful for wrting custom ShaderWarmUp to reduce jank. '
'By default, this is not enabled to reduce the overhead. '
'This is only available in profile or debug build. '
,
)
..
addFlag
(
'await-first-frame-when-tracing'
,
defaultsTo:
true
,
help:
'Whether to wait for the first frame when tracing startup ("--trace-startup"), '
...
...
@@ -311,7 +309,7 @@ class RunCommand extends RunCommandBase {
skiaDeterministicRendering:
argResults
[
'skia-deterministic-rendering'
],
traceSkia:
argResults
[
'trace-skia'
],
traceSystrace:
argResults
[
'trace-systrace'
],
dumpSkpOnShaderCompilation:
dumpSkpOnShaderCompilation
,
dumpSkpOnShaderCompilation:
argResults
[
'dump-skp-on-shader-compilation'
]
,
cacheSkSL:
cacheSkSL
,
observatoryPort:
observatoryPort
,
verboseSystemLogs:
argResults
[
'verbose-system-logs'
],
...
...
packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart
View file @
b9eb3f71
...
...
@@ -459,114 +459,6 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
group
(
'debugging options'
,
()
{
DebuggingOptions
debuggingOptions
;
String
testApp
,
testFile
;
setUp
(()
{
restoreAppStarter
();
});
Future
<
void
>
appStarterSetup
()
async
{
mockDevice
=
MockDevice
();
testDeviceManager
.
addDevice
(
mockDevice
);
final
MockDeviceLogReader
mockDeviceLogReader
=
MockDeviceLogReader
();
when
(
mockDevice
.
getLogReader
()).
thenReturn
(
mockDeviceLogReader
);
final
MockLaunchResult
mockLaunchResult
=
MockLaunchResult
();
when
(
mockLaunchResult
.
started
).
thenReturn
(
true
);
when
(
mockDevice
.
startApp
(
null
,
mainPath:
anyNamed
(
'mainPath'
),
route:
anyNamed
(
'route'
),
debuggingOptions:
anyNamed
(
'debuggingOptions'
),
platformArgs:
anyNamed
(
'platformArgs'
),
prebuiltApplication:
anyNamed
(
'prebuiltApplication'
),
)).
thenAnswer
((
Invocation
invocation
)
async
{
debuggingOptions
=
invocation
.
namedArguments
[
#debuggingOptions
];
return
mockLaunchResult
;
});
when
(
mockDevice
.
isAppInstalled
(
any
))
.
thenAnswer
((
_
)
=>
Future
<
bool
>.
value
(
false
));
testApp
=
fs
.
path
.
join
(
tempDir
.
path
,
'test'
,
'e2e.dart'
);
testFile
=
fs
.
path
.
join
(
tempDir
.
path
,
'test_driver'
,
'e2e_test.dart'
);
testRunner
=
(
List
<
String
>
testArgs
,
String
observatoryUri
)
async
{
throwToolExit
(
null
,
exitCode:
123
);
};
appStopper
=
expectAsync1
(
(
DriveCommand
command
)
async
{
return
true
;
},
count:
2
,
);
final
MemoryFileSystem
memFs
=
fs
;
await
memFs
.
file
(
testApp
).
writeAsString
(
'main() {}'
);
await
memFs
.
file
(
testFile
).
writeAsString
(
'main() {}'
);
}
void
_testOptionThatDefaultsToFalse
(
String
optionName
,
bool
setToTrue
,
bool
optionValue
(),
)
{
testUsingContext
(
'
$optionName
${setToTrue ? 'works' : 'defaults to false'}
'
,
()
async
{
await
appStarterSetup
();
final
List
<
String
>
args
=
<
String
>[
'drive'
,
'--target=
$testApp
'
,
if
(
setToTrue
)
optionName
,
'--no-pub'
,
];
try
{
await
createTestCommandRunner
(
command
).
run
(
args
);
}
on
ToolExit
catch
(
e
)
{
expect
(
e
.
exitCode
,
123
);
expect
(
e
.
message
,
null
);
}
verify
(
mockDevice
.
startApp
(
null
,
mainPath:
anyNamed
(
'mainPath'
),
route:
anyNamed
(
'route'
),
debuggingOptions:
anyNamed
(
'debuggingOptions'
),
platformArgs:
anyNamed
(
'platformArgs'
),
prebuiltApplication:
false
,
));
expect
(
optionValue
(),
setToTrue
?
isTrue
:
isFalse
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
ProcessManager:
()
=>
FakeProcessManager
(<
FakeCommand
>[]),
});
}
void
testOptionThatDefaultsToFalse
(
String
optionName
,
bool
optionValue
(),
)
{
_testOptionThatDefaultsToFalse
(
optionName
,
true
,
optionValue
);
_testOptionThatDefaultsToFalse
(
optionName
,
false
,
optionValue
);
}
testOptionThatDefaultsToFalse
(
'--dump-skp-on-shader-compilation'
,
()
=>
debuggingOptions
.
dumpSkpOnShaderCompilation
,
);
testOptionThatDefaultsToFalse
(
'--verbose-system-logs'
,
()
=>
debuggingOptions
.
verboseSystemLogs
,
);
testOptionThatDefaultsToFalse
(
'--cache-sksl'
,
()
=>
debuggingOptions
.
cacheSkSL
,
);
});
});
}
...
...
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