forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up OvrSession lifetime for Oculus device.
For querying basic hardware information, or supporting magic window, we shouldn't initialize the Oculus runtime for presenting. We were using the Oculus APIs on multiple threads in a way that isn't thread safe. The multithreaded usage of ovrSessions also prevented correctly handling errors like device-lost. This change makes it so we have different OvrSessions for presenting or non-presenting, and we only have one of these sessions initialized at a time. The gamepad data now comes from the OculusRenderLoop, so we aren't using the Oculus API on 3 separate threads. We aren't passing the sessions around between threads, so this also makes it more clear that we are using the API in a threadsafe way. BUG=852456, 838433, 793364 Change-Id: I4f21ce4d59c081f0e1730b52cc12d1819369a436 Reviewed-on: https://chromium-review.googlesource.com/1116241 Commit-Queue: Bill Orr <billorr@chromium.org> Reviewed-by: Klaus Weidner <klausw@chromium.org> Cr-Commit-Position: refs/heads/master@{#573093}
- Loading branch information
Bill Orr
authored and
Commit Bot
committed
Jul 6, 2018
1 parent
0ee1432
commit 582b854
Showing
10 changed files
with
297 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.