Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Bump GV to v72.0.20191202091209 #2405

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 71 additions & 3 deletions app/src/main/cpp/moz_external_vr.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ namespace gfx {
// and mapped files if we have both release and nightlies
// running at the same time? Or...what if we have multiple
// release builds running on same machine? (Bug 1563232)
#define SHMEM_VERSION "0.0.4"
static const int32_t kVRExternalVersion = 11;
#define SHMEM_VERSION "0.0.5"
static const int32_t kVRExternalVersion = 12;

// We assign VR presentations to groups with a bitmask.
// Currently, we will only display either content or chrome.
Expand All @@ -63,6 +63,7 @@ static const uint32_t kVRGroupAll = 0xffffffff;

static const int kVRDisplayNameMaxLen = 256;
static const int kVRControllerNameMaxLen = 256;
static const int kProfileNameListMaxLen = 256;
static const int kVRControllerMaxCount = 16;
static const int kVRControllerMaxButtons = 64;
static const int kVRControllerMaxAxis = 16;
Expand Down Expand Up @@ -118,14 +119,22 @@ enum class ControllerCapabilityFlags : uint16_t {
* linear acceleration.
*/
Cap_LinearAcceleration = 1 << 4,
/**
* Cap_GripSpacePosition is set if the Gamepad has a grip space position.
*/
Cap_GripSpacePosition = 1 << 5,
/**
* Cap_All used for validity checking during IPC serialization
*/
Cap_All = (1 << 5) - 1
Cap_All = (1 << 6) - 1
};

#endif // ifndef MOZILLA_INTERNAL_API

enum class TargetRayMode : uint8_t { Gaze, TrackedPointer, Screen };

enum class GamepadMappingType : uint8_t { _empty, Standard, XRStandard };

enum class VRDisplayBlendMode : uint8_t { Opaque, Additive, AlphaBlend };

enum class VRDisplayCapabilityFlags : uint16_t {
Expand Down Expand Up @@ -332,6 +341,37 @@ struct VRControllerState {
#else
ControllerHand hand;
#endif
// https://immersive-web.github.io/webxr/#enumdef-xrtargetraymode
TargetRayMode targetRayMode;

// Space-delimited list of input profile names, in decending order
// of specificity.
// https://immersive-web.github.io/webxr/#dom-xrinputsource-profiles
char profiles[kProfileNameListMaxLen];

// https://immersive-web.github.io/webxr-gamepads-module/#enumdef-gamepadmappingtype
GamepadMappingType mappingType;

// Start frame ID of the most recent primary select
// action, or 0 if the select action has never occurred.
uint64_t selectActionStartFrameId;
// End frame Id of the most recent primary select
// action, or 0 if action never occurred.
// If selectActionStopFrameId is less than
// selectActionStartFrameId, then the select
// action has not ended yet.
uint64_t selectActionStopFrameId;

// start frame Id of the most recent primary squeeze
// action, or 0 if the squeeze action has never occurred.
uint64_t squeezeActionStartFrameId;
// End frame Id of the most recent primary squeez
// action, or 0 if action never occurred.
// If squeezeActionStopFrameId is less than
// squeezetActionStartFrameId, then the squeeze
// action has not ended yet.
uint64_t squeezeActionEndFrameId;

uint32_t numButtons;
uint32_t numAxes;
uint32_t numHaptics;
Expand All @@ -347,9 +387,20 @@ struct VRControllerState {
#else
ControllerCapabilityFlags flags;
#endif

// When Cap_Position is set in flags, pose corresponds
// to the controllers' pose in target ray space:
// https://immersive-web.github.io/webxr/#dom-xrinputsource-targetrayspace
VRPose pose;

// When Cap_GripSpacePosition is set in flags, gripPose corresponds
// to the controllers' pose in grip space:
// https://immersive-web.github.io/webxr/#dom-xrinputsource-gripspace
VRPose gripPose;

bool isPositionValid;
bool isOrientationValid;

#ifdef MOZILLA_INTERNAL_API
void Clear() { memset(this, 0, sizeof(VRControllerState)); }
#endif
Expand Down Expand Up @@ -421,6 +472,23 @@ struct VRBrowserState {
#if defined(__ANDROID__)
bool shutdown;
#endif // defined(__ANDROID__)
/**
* In order to support WebXR's navigator.xr.IsSessionSupported call without
* displaying any permission dialogue, it is necessary to have a safe way to
* detect the capability of running a VR or AR session without activating XR
* runtimes or powering on hardware.
*
* API's such as OpenVR make no guarantee that hardware and software won't be
* left activated after enumerating devices, so each backend in gfx/vr/service
* must allow for more granular detection of capabilities.
*
* When detectRuntimesOnly is true, the initialization exits early after
* reporting the presence of XR runtime software.
*
* The result of the runtime detection is reported with the Cap_ImmersiveVR
* and Cap_ImmersiveAR bits in VRDisplayState.flags.
*/
bool detectRuntimesOnly;
bool presentationActive;
bool navigationTransitionActive;
VRLayerState layerState[kVRLayerMaxCount];
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ext.deps = [:]
def versions = [:]
// GeckoView versions can be found here:
// https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/
versions.gecko_view = "72.0.20191126093448"
versions.gecko_view = "72.0.20191202091209"
versions.android_components = "21.0.0"
// Note that android-components also depends on application-services,
// and in fact is our main source of appservices-related functionality.
Expand Down