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

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

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Further cleanups 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..fe1123b040f2984e5da85fb2d8bb78079c2bcde1 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -12,6 +12,7 @@
#include "device/vr/android/gvr/gvr_delegate.h"
#include "device/vr/android/gvr/gvr_device_provider.h"
#include "device/vr/vr_device_manager.h"
+#include "gpu/command_buffer/common/mailbox.h"
#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
#include "ui/gfx/transform.h"
@@ -56,10 +57,16 @@ void GvrDevice::ExitPresent() {
OnExitPresent();
}
-void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
+void GvrDevice::SubmitFrame(
+ mojom::VRPosePtr pose,
+ mojom::VRSubmitFrameClientPtr submit_client) {
GvrDelegate* delegate = GetGvrDelegate();
- if (delegate)
- delegate->SubmitWebVRFrame();
+ if (delegate) {
+ gpu::Mailbox mailbox;
+ mailbox.SetName(&pose->mailbox->name[0]);
+ delegate->SubmitWebVRFrame(
+ pose->frameId, mailbox, std::move(submit_client));
+ }
}
void GvrDevice::UpdateLayerBounds(int16_t frame_index,

Powered by Google App Engine
This is Rietveld 408576698