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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

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
Index: chrome/browser/android/vr_shell/vr_shell.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index deb1f1fefdd8dffe017701b027c1dfb4aff4c912..751207af22fa37fcb1a9e1a62511f64d429ef789 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -32,6 +32,10 @@ namespace content {
class WebContents;
}
+namespace gpu {
+struct MailboxHolder;
+}
+
namespace ui {
class WindowAndroid;
}
@@ -169,8 +173,10 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
gvr::GvrApi* gvr_api,
- gvr::Sizei compositor_size,
+ gvr::Sizei recommended_size,
uint32_t device_id);
+ void OnSubmitWebVRFrameTransferred(int frame_index);
+ void OnSubmitWebVRFrameRendered(int frame_index);
private:
~VrShell() override;
@@ -186,10 +192,14 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
// device::GvrDelegate implementation
void SetWebVRSecureOrigin(bool secure_origin) override;
- void SubmitWebVRFrame() override;
+ void SubmitWebVRFrame(
+ int16_t frame_index,
+ const gpu::MailboxHolder& mailbox,
+ device::mojom::VRSubmitFrameClientPtr submit_client) override;
void UpdateWebVRTextureBounds(int16_t frame_index,
const gvr::Rectf& left_bounds,
- const gvr::Rectf& right_bounds) override;
+ const gvr::Rectf& right_bounds,
+ const gvr::Sizei& source_size) override;
void OnVRVsyncProviderRequest(
device::mojom::VRVSyncProviderRequest request) override;
void UpdateVSyncInterval(int64_t timebase_nanos,
@@ -207,6 +217,9 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
std::unique_ptr<UiInterface> html_interface_;
bool content_paused_ = false;
bool webvr_mode_ = false;
+ std::map<int, device::mojom::VRSubmitFrameClientPtr> webvr_submit_clients_;
+ std::map<int, bool> webvr_submit_client_transferring_;
+ std::map<int, bool> webvr_submit_client_rendering_;
content::WebContents* main_contents_ = nullptr;
base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_;
« no previous file with comments | « chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698