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

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

Issue 2738683002: WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Less hacked up version Created 3 years, 9 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
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/test/fake_vr_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..82d615eb571c9a63ac71409be2078b0787af50c6 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -56,15 +56,20 @@ void GvrDevice::ExitPresent() {
OnExitPresent();
}
-void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
+void GvrDevice::SubmitFrame(int16_t frame_index,
+ const gpu::MailboxHolder& mailbox,
+ mojom::VRSubmitFrameClientPtr submit_client) {
GvrDelegate* delegate = GetGvrDelegate();
- if (delegate)
- delegate->SubmitWebVRFrame();
+ if (delegate) {
+ delegate->SubmitWebVRFrame(frame_index, mailbox, std::move(submit_client));
+ }
}
void GvrDevice::UpdateLayerBounds(int16_t frame_index,
mojom::VRLayerBoundsPtr left_bounds,
- mojom::VRLayerBoundsPtr right_bounds) {
+ mojom::VRLayerBoundsPtr right_bounds,
+ int16_t source_width,
+ int16_t source_height) {
GvrDelegate* delegate = GetGvrDelegate();
if (!delegate)
return;
@@ -81,8 +86,9 @@ void GvrDevice::UpdateLayerBounds(int16_t frame_index,
right_gvr_bounds.right = right_bounds->left + right_bounds->width;
right_gvr_bounds.bottom = 1.0f - (right_bounds->top + right_bounds->height);
+ gvr::Sizei source_size = {source_width, source_height};
delegate->UpdateWebVRTextureBounds(frame_index, left_gvr_bounds,
- right_gvr_bounds);
+ right_gvr_bounds, source_size);
}
void GvrDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/test/fake_vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698