Chromium Code Reviews| 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 819208f3a6a69719ffa68de93d0b3ab7ba85c498..7c01defe9071803c8dd6de65efdd0fdb2b49925f 100644 |
| --- a/chrome/browser/android/vr_shell/vr_shell.h |
| +++ b/chrome/browser/android/vr_shell/vr_shell.h |
| @@ -133,6 +133,7 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver { |
| const std::vector<const ContentRectangle*>& elements); |
| void DrawCursor(const gvr::Mat4f& render_matrix); |
| void DrawWebVr(); |
| + bool WebVrPoseByteIsValid(int pose_index_byte); |
| void UpdateController(const gvr::Vec3f& forward_vector); |
| void SendEventsToTarget(VrInputManager* input_target, |
| @@ -205,6 +206,12 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver { |
| // current backlog of poses which is 2-3 frames. |
| static constexpr int kPoseRingBufferSize = 8; |
| std::vector<gvr::Mat4f> webvr_head_pose_; |
| + std::vector<bool> webvr_head_pose_valid_; |
| + // Wait for a few seconds of valid poses before reprojecting, see |
| + // crbug.com/667327. During this time, content is being drawn, just |
| + // without reprojection. |
| + static constexpr int webvr_min_valid_poses_ = 60; |
|
mthiesse
2016/12/01 21:53:15
I don't think we should land this min_valid_poses_
klausw
2016/12/01 22:36:04
I've removed it, it's unclear. Got a black screen
|
| + int webvr_valid_poses_seen_ = 0; |
| jint webvr_texture_id_ = 0; |
| std::unique_ptr<VrController> controller_; |