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

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

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Rebase to 11e28fd6b9380b77273db51ef0b6ccc7ea341944 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/android/gvr/gvr_device_provider.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..c0b8e5a032759b6e9b098007dba77ab81e7f0764 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -40,8 +40,9 @@ void GvrDevice::ResetPose() {
delegate->ResetPose();
}
-void GvrDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
- gvr_provider_->RequestPresent(callback);
+void GvrDevice::RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
+ const base::Callback<void(bool)>& callback) {
+ gvr_provider_->RequestPresent(std::move(submit_client), callback);
}
void GvrDevice::SetSecureOrigin(bool secure_origin) {
@@ -56,15 +57,19 @@ void GvrDevice::ExitPresent() {
OnExitPresent();
}
-void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
+void GvrDevice::SubmitFrame(int16_t frame_index,
+ const gpu::MailboxHolder& mailbox) {
GvrDelegate* delegate = GetGvrDelegate();
- if (delegate)
- delegate->SubmitWebVRFrame();
+ if (delegate) {
+ delegate->SubmitWebVRFrame(frame_index, mailbox);
+ }
}
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) {
@@ -103,7 +109,7 @@ void GvrDevice::OnDelegateChanged() {
}
GvrDelegate* GvrDevice::GetGvrDelegate() {
- GvrDelegateProvider* delegate_provider = GvrDelegateProvider::GetInstance();
+ GvrDelegateProvider* delegate_provider = gvr_provider_->GetDelegateProvider();
if (delegate_provider)
return delegate_provider->GetDelegate();
return nullptr;
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/android/gvr/gvr_device_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698