Commit 195035c8 authored by Klaus Weidner's avatar Klaus Weidner Committed by Commit Bot

WebXR AR: disable shared buffer for frame transfer

This is a workaround for an issue where the WebXR framebuffer content is
displayed out of order, leading to jumpy animations and other glitches.

Until the root cause is identified, disable shared buffer frame
transfer, and instead use the Mailbox+Surface path. This was originally
intended for use on Android N which doesn't support AHardwareBuffer,
and is less efficient due to needing an extra pixel copy, but the APIs
are still supported on current Android versions.

Bug: 1067795
Change-Id: I256f878836eeac201934392ec6ce79f9f2fd7c53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135957Reviewed-by: default avatarPiotr Bialecki <bialpio@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756492}
parent 5dd7b07c
...@@ -67,7 +67,12 @@ void ArImageTransport::Initialize(vr::WebXrPresentationState* webxr, ...@@ -67,7 +67,12 @@ void ArImageTransport::Initialize(vr::WebXrPresentationState* webxr,
glGenFramebuffersEXT(1, &camera_fbo_); glGenFramebuffersEXT(1, &camera_fbo_);
shared_buffer_draw_ = base::AndroidHardwareBufferCompat::IsSupportAvailable(); // TODO(https://crbug.com/1067795): frames are arriving out of order when
// using shared buffers.
//
// This should equal base::AndroidHardwareBufferCompat::IsSupportAvailable(),
// but force use of the Mailbox-to-Surface copy path until the bug is fixed.
shared_buffer_draw_ = false;
if (shared_buffer_draw_) { if (shared_buffer_draw_) {
DVLOG(2) << __func__ << ": UseSharedBuffer()=true"; DVLOG(2) << __func__ << ": UseSharedBuffer()=true";
......
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