OSDN Git Service

Properly recover vr_wm from surface vr_flinger crashes.
authorAlex Sakhartchouk <alexst@google.com>
Sun, 26 Mar 2017 02:22:16 +0000 (22:22 -0400)
committerAlex Sakhartchouk <alexst@google.com>
Sun, 26 Mar 2017 02:46:44 +0000 (02:46 +0000)
commit5e91f68c8e5f0ef1742dbeafbcb5d1c833ab248a
tree9fa0ba6aab29520d78cb93809dd7b5e21346bb7a
parente153b292d8c0f445fc16fa4a4ca6b0b88defad9f
Properly recover vr_wm from surface vr_flinger crashes.

This is addressing a number of issues:

1) surface_flinger_view_ was incorrectly reset
on de-allocation, which renders vr_wm incapable of seeing
new frames after a crash.

2) dvrGraphicsWaitNextFrame will return -1 if vr_flinger
crashes, which means our graphics context is no longer valid.
We need to de-allocate resources and wait for SF to
reconnect.

3) Displays needed be be de-allocated on SF detach because
they will return incorrect fences on SF re-connect.

4) display_client_ needs to be allocated on demand instead
of at initialization time because vr_flinger crash
invalidates it.

Bug: 36589793
Test: Crash vr_flinger, observe vr_wm working after SF restarts.

Change-Id: I72a79690ee5224e3326c7c571ae4e23797103e6d
services/vr/vr_window_manager/application.cpp
services/vr/vr_window_manager/shell_view.cpp