Commit 174691ad authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Fix screen taps for Sensorless Inline XRSessions

Currently, getPose for a screen tap on a sensorless inline session fails
because there is no "MojoFromViewer" pose available.  In a sensorless
session "Mojo" Space and "Viewer" space are the same, so this should
return identity.

Fixed: 1031596
Change-Id: Ic09590be6bbeff84cfaad894a2c1702ed7d3f896
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978901
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728051}
parent ddd7af6f
...@@ -1528,8 +1528,12 @@ base::Optional<TransformationMatrix> XRSession::MojoFromViewer() const { ...@@ -1528,8 +1528,12 @@ base::Optional<TransformationMatrix> XRSession::MojoFromViewer() const {
if (!CanReportPoses()) if (!CanReportPoses())
return base::nullopt; return base::nullopt;
if (!mojo_from_viewer_) if (!mojo_from_viewer_) {
if (sensorless_session_)
return TransformationMatrix();
return base::nullopt; return base::nullopt;
}
return *mojo_from_viewer_.get(); return *mojo_from_viewer_.get();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment