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

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

Issue 2739973002: Revert of WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: 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 c0b8e5a032759b6e9b098007dba77ab81e7f0764..f0a86e2fd9a94fb14ecff45c05a1d120fa63521a 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -40,9 +40,8 @@
delegate->ResetPose();
}
-void GvrDevice::RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
- const base::Callback<void(bool)>& callback) {
- gvr_provider_->RequestPresent(std::move(submit_client), callback);
+void GvrDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
+ gvr_provider_->RequestPresent(callback);
}
void GvrDevice::SetSecureOrigin(bool secure_origin) {
@@ -57,19 +56,15 @@
OnExitPresent();
}
-void GvrDevice::SubmitFrame(int16_t frame_index,
- const gpu::MailboxHolder& mailbox) {
+void GvrDevice::SubmitFrame(mojom::VRPosePtr pose) {
GvrDelegate* delegate = GetGvrDelegate();
- if (delegate) {
- delegate->SubmitWebVRFrame(frame_index, mailbox);
- }
+ if (delegate)
+ delegate->SubmitWebVRFrame();
}
void GvrDevice::UpdateLayerBounds(int16_t frame_index,
mojom::VRLayerBoundsPtr left_bounds,
- mojom::VRLayerBoundsPtr right_bounds,
- int16_t source_width,
- int16_t source_height) {
+ mojom::VRLayerBoundsPtr right_bounds) {
GvrDelegate* delegate = GetGvrDelegate();
if (!delegate)
return;
@@ -86,9 +81,8 @@
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, source_size);
+ right_gvr_bounds);
}
void GvrDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {
@@ -109,7 +103,7 @@
}
GvrDelegate* GvrDevice::GetGvrDelegate() {
- GvrDelegateProvider* delegate_provider = gvr_provider_->GetDelegateProvider();
+ GvrDelegateProvider* delegate_provider = GvrDelegateProvider::GetInstance();
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