Live image cache (#50318)

Track images available on screen
This commit is contained in:
Dan Field
2020-02-14 15:03:05 -08:00
committed by GitHub
parent ea4d969ecc
commit 1602be6ab6
10 changed files with 688 additions and 50 deletions

View File

@@ -20,7 +20,7 @@ void main() {
final developer.ServiceProtocolInfo info = await developer.Service.getInfo();
if (info.serverUri == null) {
throw TestFailure('This test _must_ be run with --enable-vmservice.');
fail('This test _must_ be run with --enable-vmservice.');
}
await timelineObtainer.connect(info.serverUri);
await timelineObtainer.setDartFlags();
@@ -58,7 +58,8 @@ void main() {
'name': 'ImageCache.clear',
'args': <String, dynamic>{
'pendingImages': 1,
'cachedImages': 0,
'keepAliveImages': 0,
'liveImages': 1,
'currentSizeInBytes': 0,
'isolateId': isolateId,
}
@@ -153,7 +154,7 @@ class TimelineObtainer {
Future<void> close() async {
expect(_completers, isEmpty);
await _observatorySocket.close();
await _observatorySocket?.close();
}
}