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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.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 | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 9a79b1c688cd9b16a71440467a5b99e372884d51..1a43be9b47ace59b6a423f32964855552595b391 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -36,7 +36,6 @@
#include "content/public/common/referrer.h"
#include "device/vr/android/gvr/gvr_device.h"
#include "device/vr/android/gvr/gvr_device_provider.h"
-#include "gpu/command_buffer/common/mailbox.h"
#include "jni/VrShellImpl_jni.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
#include "ui/android/view_android.h"
@@ -171,7 +170,6 @@
}
VrShell::~VrShell() {
- delegate_provider_->RemoveDelegate();
{
// The GvrLayout is, and must always be, used only on the UI thread, and the
// GvrApi used for rendering should only be used from the GL thread as it's
@@ -187,6 +185,7 @@
base::ThreadRestrictions::ScopedAllowIO allow_io;
gl_thread_.reset();
}
+ delegate_provider_->RemoveDelegate();
g_instance = nullptr;
}
@@ -272,7 +271,6 @@
metrics_helper_->SetWebVREnabled(enabled);
PostToGlThreadWhenReady(base::Bind(&VrShellGl::SetWebVrMode,
gl_thread_->GetVrShellGl(), enabled));
-
html_interface_->SetMode(enabled ? UiInterface::Mode::WEB_VR
: UiInterface::Mode::STANDARD);
}
@@ -326,22 +324,14 @@
html_interface_->SetWebVRSecureOrigin(secure_origin);
}
-void VrShell::SubmitWebVRFrame(int16_t frame_index,
- const gpu::MailboxHolder& mailbox) {
- TRACE_EVENT1("gpu", "SubmitWebVRFrame", "frame", frame_index);
-
- PostToGlThreadWhenReady(base::Bind(&VrShellGl::SubmitWebVRFrame,
- gl_thread_->GetVrShellGl(), frame_index,
- mailbox));
-}
+void VrShell::SubmitWebVRFrame() {}
void VrShell::UpdateWebVRTextureBounds(int16_t frame_index,
const gvr::Rectf& left_bounds,
- const gvr::Rectf& right_bounds,
- const gvr::Sizei& source_size) {
+ const gvr::Rectf& right_bounds) {
PostToGlThreadWhenReady(base::Bind(&VrShellGl::UpdateWebVRTextureBounds,
gl_thread_->GetVrShellGl(), frame_index,
- left_bounds, right_bounds, source_size));
+ left_bounds, right_bounds));
}
bool VrShell::SupportsPresentation() {
@@ -388,10 +378,6 @@
}
void VrShell::GvrDelegateReady() {
- PostToGlThreadWhenReady(base::Bind(
- &VrShellGl::SetSubmitClient, gl_thread_->GetVrShellGl(),
- base::Passed(
- delegate_provider_->TakeSubmitFrameClient().PassInterface())));
delegate_provider_->SetDelegate(this, gvr_api_);
}
@@ -639,7 +625,7 @@
device::mojom::VRDisplayInfoPtr VrShell::CreateVRDisplayInfo(
gvr::GvrApi* gvr_api,
- gvr::Sizei recommended_size,
+ gvr::Sizei compositor_size,
uint32_t device_id) {
TRACE_EVENT0("input", "GvrDevice::GetVRDevice");
@@ -668,8 +654,8 @@
(eye == GVR_LEFT_EYE) ? device->leftEye : device->rightEye;
eye_params->fieldOfView = device::mojom::VRFieldOfView::New();
eye_params->offset.resize(3);
- eye_params->renderWidth = recommended_size.width / 2;
- eye_params->renderHeight = recommended_size.height;
+ eye_params->renderWidth = compositor_size.width / 2;
+ eye_params->renderHeight = compositor_size.height;
gvr::BufferViewport eye_viewport = gvr_api->CreateBufferViewport();
gvr_buffer_viewports.GetBufferViewport(eye, &eye_viewport);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698