Commit 6c800f4b authored by Patrick To's avatar Patrick To Committed by Commit Bot

Reland "Update WMR display info when starting session"

This is a reland of e475b274

Original change's description:
> Update WMR display info when starting session
> 
> I3491d43245bb53100212fd2d0ab38d8f1222e7c9 addresses the issue where the
> render width/height is not initially sent back to the render process.
> This is accomlpished by updating the display info when the session starts
> instead of on the first render frame.
> 
> A subsequent change, I4cf2ab2ed6455963b1f43f8717941e7a0368416a, wraps
> this update around the visibility state. Since the visibility state is
> initially hidden, the display info isn't updated resulting in
> WebVR/WebXR pages using the wrong resolution
> 
> This change explicitly updates the display info and sends it back to the
> MixedRealityDevice when the session starts.
> 
> Change-Id: Ifb4516b36203139038aa943d68e8c3ba717003f3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810303
> Commit-Queue: Patrick To <patrto@microsoft.com>
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#698172}

Change-Id: I7289fdc18f2d99a0ab29eb86af0b9dbed13ba275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819703Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699014}
parent 028b12c5
...@@ -271,7 +271,11 @@ bool MixedRealityRenderLoop::StartRuntime() { ...@@ -271,7 +271,11 @@ bool MixedRealityRenderLoop::StartRuntime() {
// the device of the correct values before it sends the initial info to the // the device of the correct values before it sends the initial info to the
// renderer. The frame must be submitted because WMR requires frames to be // renderer. The frame must be submitted because WMR requires frames to be
// submitted in the order they're created. // submitted in the order they're created.
GetNextFrameData(); UpdateWMRDataForNextFrame();
UpdateDisplayInfo();
main_thread_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(on_display_info_changed_, current_display_info_.Clone()));
return SubmitCompositedFrame(); return SubmitCompositedFrame();
} }
......
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