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

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

Issue 2384593002: Encode frame number in pixel data for pose sync (Closed)
Patch Set: bajones #40: add sanity check + pointer zeroing Created 4 years, 2 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 | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('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.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index fd686f6921d51c2fc508720e80d508f6629f499c..581fe99305dad69c467ede2f4746510f6e7e9a43 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -88,6 +88,7 @@ class VrShell : public device::GvrDelegate {
void UpdateWebVRTextureBounds(
int eye, float left, float top, float width, float height) override;
gvr::GvrApi* gvr_api() override;
+ void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num) override;
void ContentSurfaceChanged(
JNIEnv* env,
@@ -175,6 +176,11 @@ class VrShell : public device::GvrDelegate {
bool webvr_mode_ = false;
bool webvr_secure_origin_ = false;
int64_t webvr_warning_end_nanos_ = 0;
+ // The pose ring buffer size must be a power of two to avoid glitches when
+ // the pose index wraps around. It should be large enough to handle the
+ // current backlog of poses which is 2-3 frames.
+ static constexpr int kPoseRingBufferSize = 8;
+ std::vector<gvr::Mat4f> webvr_head_pose_;
std::unique_ptr<VrController> controller_;
scoped_refptr<VrInputManager> content_input_manager_;
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698