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 56b69dd659f377e3a73299d88845912b6b0aa24c..6bdc50275351e0fa5fe1c0a258a81eb405f9ff24 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell.h |
+++ b/chrome/browser/android/vr_shell/vr_shell.h |
@@ -73,6 +73,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, |
@@ -156,6 +157,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_; |
base::WeakPtrFactory<VrShell> weak_ptr_factory_; |