Bug 1427830 - If VR submit thread is inactive in Oculus, don't post tasks; r=kip

MozReview-Commit-ID: BKaD7ft3Fms

--HG--
extra : rebase_source : 94efe7f82541bfcf45f07b8ca83daa6edb1281c9
This commit is contained in:
Daosheng Mu 2018-01-04 10:52:55 +08:00
parent e3c4440392
commit 9dfae67fe9

View File

@ -390,14 +390,14 @@ VROculusSession::Refresh(bool aForceRefresh)
if (mSession && mTextureSet) {
if (!aForceRefresh) {
// VROculusSession didn't start submitting frames yet.
if (!mSubmitThread) {
// Or, the VR thread has been shut down already.
if (!mSubmitThread || !mSubmitThread->IsActive()) {
return;
}
// ovr_SubmitFrame is running at VR Submit thread,
// so we post this task to VR Submit thread and let it paint
// a black frame.
mDrawBlack = true;
MOZ_ASSERT(mSubmitThread->IsActive());
mSubmitThread->PostTask(NewRunnableMethod<bool>(
"gfx::VROculusSession::Refresh",
this,