зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1407423 - Part 2: Update gfxVRGVR to match refactoring,r=rbarker
MozReview-Commit-ID: DmKnEZanQ3f --HG-- extra : rebase_source : d2e0e0d9df4b6a9fa5cba948de1df008ccb83d4f extra : amend_source : 54bcc89fb6183a7c320f034de1f39d9737af04b9
This commit is contained in:
Родитель
7e7cb086d3
Коммит
6230261aac
|
@ -340,12 +340,6 @@ VRDisplayGVR::SubmitFrame(const mozilla::layers::EGLImageDescriptor* aDescriptor
|
|||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
VRDisplayGVR::NotifyVSync()
|
||||
{
|
||||
VRDisplayHost::NotifyVSync();
|
||||
}
|
||||
|
||||
static void
|
||||
FillMatrix(gfx::Matrix4x4 &target, const gvr_mat4f& source)
|
||||
{
|
||||
|
@ -712,19 +706,40 @@ VRSystemManagerGVR::Shutdown()
|
|||
|
||||
}
|
||||
|
||||
bool
|
||||
VRSystemManagerGVR::GetHMDs(nsTArray<RefPtr<VRDisplayHost> >& aHMDResult)
|
||||
void
|
||||
VRSystemManagerGVR::Enumerate()
|
||||
{
|
||||
if (!GeckoVRManager::IsGVRPresent()) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mGVRHMD) {
|
||||
mGVRHMD = new VRDisplayGVR();
|
||||
}
|
||||
}
|
||||
|
||||
aHMDResult.AppendElement(mGVRHMD);
|
||||
return true;
|
||||
bool
|
||||
VRSystemManagerGVR::ShouldInhibitEnumeration()
|
||||
{
|
||||
if (VRSystemManager::ShouldInhibitEnumeration()) {
|
||||
return true;
|
||||
}
|
||||
if (mGVRHMD) {
|
||||
// When we find an a VR device, don't
|
||||
// allow any further enumeration as it
|
||||
// may get picked up redundantly by other
|
||||
// API's.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
VRSystemManagerGVR::GetHMDs(nsTArray<RefPtr<VRDisplayHost>>& aHMDResult)
|
||||
{
|
||||
if (mGVRHMD) {
|
||||
aHMDResult.AppendElement(mGVRHMD);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -60,7 +60,6 @@ public:
|
|||
bool SubmitFrame(const mozilla::layers::EGLImageDescriptor* aDescriptor,
|
||||
const gfx::Rect& aLeftEyeRect,
|
||||
const gfx::Rect& aRightEyeRect) override;
|
||||
void NotifyVSync() override;
|
||||
protected:
|
||||
virtual VRHMDSensorState GetSensorState() override;
|
||||
// END VRDisplayHost interface
|
||||
|
@ -105,7 +104,9 @@ public:
|
|||
|
||||
void Destroy() override;
|
||||
void Shutdown() override;
|
||||
bool GetHMDs(nsTArray<RefPtr<VRDisplayHost> >& aHMDResult) override;
|
||||
void Enumerate() override;
|
||||
bool ShouldInhibitEnumeration() override;
|
||||
void GetHMDs(nsTArray<RefPtr<VRDisplayHost>>& aHMDResult) override;
|
||||
bool GetIsPresenting() override;
|
||||
void HandleInput() override;
|
||||
void GetControllers(nsTArray<RefPtr<VRControllerHost>>&
|
||||
|
|
Загрузка…
Ссылка в новой задаче