Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: device/vr/android/gvr/gvr_device.cc

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/vr/android/gvr/gvr_device.cc
diff --git a/device/vr/android/gvr/gvr_device.cc b/device/vr/android/gvr/gvr_device.cc
index f0a86e2fd9a94fb14ecff45c05a1d120fa63521a..71e02313eb23bc7470b656b05b410432f7f84e4e 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -17,6 +17,8 @@
#include "ui/gfx/transform.h"
#include "ui/gfx/transform_util.h"
+#include "gpu/command_buffer/common/mailbox.h"
+
namespace device {
GvrDevice::GvrDevice(GvrDeviceProvider* provider)
@@ -58,8 +60,11 @@ void GvrDevice::ExitPresent() {
void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
GvrDelegate* delegate = GetGvrDelegate();
- if (delegate)
- delegate->SubmitWebVRFrame();
+ if (delegate) {
+ gpu::Mailbox mailbox;
+ mailbox.SetName(&pose->mailbox->name[0]);
+ delegate->SubmitWebVRFrame(pose->frameId, mailbox);
+ }
}
void GvrDevice::UpdateLayerBounds(int16_t frame_index,

Powered by Google App Engine
This is Rietveld 408576698