Skip to content

Commit

Permalink
Revert "Implemented generic-hand-select over OpenXR"
Browse files Browse the repository at this point in the history
This reverts commit d1aab4b.

Reason for revert: To fix compile failures after crrev.com/c/2472913
See https://crbug.com/1138151

Original change's description:
> Implemented generic-hand-select over OpenXR
>
> Implemented generic-hand-select using the MSFT hand interaction
> extension.
>
> Change-Id: I25595dfcf05fd0e23fb7ee9484c333321746fa0e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2469836
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Lachlan Ford <laford@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#817138}

TBR=rafael.cintron@microsoft.com,alcooper@chromium.org,laford@microsoft.com,phle@microsoft.com

Bug: 1138151
Change-Id: I33d1dcccf893b79e47738447b8c6c8ac01ae72f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473081
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817251}
  • Loading branch information
bpastene authored and Commit Bot committed Oct 14, 2020
1 parent 7ec1f43 commit f49725a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 42 deletions.
40 changes: 5 additions & 35 deletions device/vr/openxr/openxr_interaction_profiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ enum class OpenXrInteractionProfileType {
kHTCVive = 4,
kSamsungOdyssey = 5,
kHPReverbG2 = 6,
kHandSelect = 7,
kCount = 8,
kCount = 7,
};

enum class OpenXrButtonType {
Expand Down Expand Up @@ -95,7 +94,6 @@ struct OpenXrControllerInteractionProfile {
// Valve index controller.
// HTC vive controller
// HP Reverb G2 controller
// MSFT Hand Interaction
// Declare OpenXR input profile bindings for other runtimes when they become
// available.
constexpr const char* kMicrosoftMotionInputProfiles[] = {
Expand All @@ -119,9 +117,6 @@ constexpr const char* kSamsungOdysseyInputProfiles[] = {
constexpr const char* kHPReverbG2InputProfiles[] = {
"hp-mixed-reality", "oculus-touch", "generic-trigger-squeeze"};

constexpr const char* kGenericHandSelectInputProfile[] = {
"generic-hand-select"};

constexpr OpenXrButtonPathMap kMicrosoftMotionControllerButtonPathMaps[] = {
{OpenXrButtonType::kTrigger,
{
Expand Down Expand Up @@ -279,12 +274,6 @@ constexpr OpenXrButtonPathMap kHPReverbG2RightControllerButtonPathMaps[] = {
1},
};

constexpr OpenXrButtonPathMap kGenericHandSelectButtonPathMaps[] = {
{OpenXrButtonType::kTrigger,
{{OpenXrButtonActionType::kValue, "/input/select/value"}},
1},
};

constexpr OpenXrAxisPathMap kMicrosoftMotionControllerAxisPathMaps[] = {
{OpenXrAxisType::kTrackpad, "/input/trackpad"},
{OpenXrAxisType::kThumbstick, "/input/thumbstick"},
Expand Down Expand Up @@ -406,31 +395,12 @@ constexpr OpenXrControllerInteractionProfile kHPReverbG2InteractionProfile = {
kHPReverbG2ControllerAxisPathMaps,
base::size(kHPReverbG2ControllerAxisPathMaps)};

constexpr OpenXrControllerInteractionProfile
kHandInteractionMSFTInteractionProfile = {
OpenXrInteractionProfileType::kHandSelect,
"/interaction_profiles/microsoft/hand_interaction",
XR_MSFT_HAND_INTERACTION_EXTENSION_NAME,
GamepadMapping::kNone,
kGenericHandSelectInputProfile,
base::size(kGenericHandSelectInputProfile),
kGenericHandSelectButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps),
kGenericHandSelectButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps),
nullptr,
0};

constexpr OpenXrControllerInteractionProfile
kOpenXrControllerInteractionProfiles[] = {
kMicrosoftMotionInteractionProfile,
kKHRSimpleInteractionProfile,
kOculusTouchInteractionProfile,
kValveIndexInteractionProfile,
kHTCViveInteractionProfile,
kSamsungOdysseyInteractionProfile,
kHPReverbG2InteractionProfile,
kHandInteractionMSFTInteractionProfile};
kMicrosoftMotionInteractionProfile, kKHRSimpleInteractionProfile,
kOculusTouchInteractionProfile, kValveIndexInteractionProfile,
kHTCViveInteractionProfile, kSamsungOdysseyInteractionProfile,
kHPReverbG2InteractionProfile};

} // namespace device

Expand Down
7 changes: 0 additions & 7 deletions device/vr/openxr/openxr_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ XrResult CreateInstance(XrInstance* instance) {
extensions.push_back(kExtHPMixedRealityControllerExtensionName);
}

const bool handInteractionExtensionSupported =
extension_enumeration.ExtensionSupported(
XR_MSFT_HAND_INTERACTION_EXTENSION_NAME);
if (handInteractionExtensionSupported) {
extensions.push_back(XR_MSFT_HAND_INTERACTION_EXTENSION_NAME);
}

instance_create_info.enabledExtensionCount =
static_cast<uint32_t>(extensions.size());
instance_create_info.enabledExtensionNames = extensions.data();
Expand Down

0 comments on commit f49725a

Please sign in to comment.