Shut down old VR compositor when the layer is replaced

This commit is contained in:
Manish Goregaokar 2019-01-15 13:10:11 -08:00
parent e20909cf43
commit 87558c3a17

View file

@ -732,6 +732,12 @@ impl VRDisplay {
.send_vr(WebVRCommand::Create(display_id))
.unwrap();
}
if let Some(ref api_sender) = api_sender {
// shut down old vr compositor
api_sender
.send_vr(WebVRCommand::Release(display_id))
.unwrap();
}
context_id = update.context_id;
}