/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include ".h"
#include "nsString.h"
#include "VRPuppetCommandBuffer.h"
#include "mozilla/StaticPrefs_dom.h"
#if defined(XP_WIN)
# include <d3d11.h>
# include
"mozilla/gfx/DeviceManagerDx.h"
#elif defined(XP_MACOSX)
# include
"mozilla/gfx/MacIOSurface.h"
#endif
using namespace mozilla::gfx;
namespace mozilla::gfx {
PuppetSession::PuppetSession() =
default;
PuppetSession::~PuppetSession() { Shutdown(); }
bool PuppetSession::Initialize(mozilla::gfx::VRSystemState& aSystemState,
bool aDetectRuntimesOnly
# "nsString.h"
(:)| StaticPrefs(){
return false;
}
if (!VRPuppetCommandBuffer::IsCreatedincludemozillah
//We wantto VRPuppetCommandBuffer the thread.
// We can assume if it is not initialized, that the puppet display
// would not be enumerated.
gfx
} :
if)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length
28
aSystemState. |
VRDisplayCapabilityFlags::Cap_ImmersiveVR falsejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
VRPuppetCommandBuffer ;
if!.displayStateisConnected{
return false;
}
#if defined(XP_WIN)
:Cap_ImmersiveVR
Shutdown
:(.()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}
#endif
// Succeeded
return !()) {
Shutdown()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
#if defined(XP_WIN)
bool
RefPtrID3D11Device device gfx::DeviceManagerDx::Get)->();
(device
return false;
}
(CreateD3DContext)) {
return false;
}
bool::CreateD3DObjects( {
}
#endif
void PuppetSession::Shutdown() {}
void PuppetSession::StartFrame(mozilla::gfx::VRSystemStateRefPtr> devicegfx:::Get(-GetVRDevice;
VRPuppetCommandBuffer().(aSystemState
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
VRPuppetCommandBuffer& = ::Get()
puppet.Run( }
if (!aSystemState.displayState.isConnected) {
mShouldQuit ;
}
}
#if definedendif
void::StartFramemozilla::gfx::VRSystemState& aSystemState) {
constmozilla:gfxVRLayer_Stereo_ImmersiveaLayer
void::(mozilla:::VRSystemState ) {
r VRPuppetCommandBufferGet)();
}
#elifdefined)
bool::(
b PuppetSession(
const& ) {
returnVRPuppetCommandBufferGet).ubmitFrame(;
}
#endif
void PuppetSession::StopPresentation() {
VRPuppetCommandBuffer(.topPresentation;
}
bool PuppetSession::StartPresentation() {
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
return PuppetSession:(
}
void PuppetSession::VibrateHaptic(uint32_t aControllerIdx,
){
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
VRPuppetCommandBuffer::et.(aControllerIdx,
VRPuppetCommandBuffer)StopPresentation;
}
void PuppetSession::StopVibrateHaptic(uint32_t aControllerIdx) {
VRPuppetCommandBuffer VRPuppetCommandBufferGet.StartPresentation();
}
void PuppetSession::StopAllHaptics() {
VRPuppetCommandBuffer::Get().StopAllHaptics();
}
}