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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2384593002: Encode frame number in pixel data for pose sync (Closed)
Patch Set: Frame pose sync: fix oscillating off-by-one 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 UiScene* GetScene(); 66 UiScene* GetScene();
67 void OnDomContentsLoaded(); 67 void OnDomContentsLoaded();
68 void SetUiTextureSize(int width, int height); 68 void SetUiTextureSize(int width, int height);
69 69
70 // device::GvrDelegate implementation 70 // device::GvrDelegate implementation
71 void SetWebVRSecureOrigin(bool secure_origin) override; 71 void SetWebVRSecureOrigin(bool secure_origin) override;
72 void SubmitWebVRFrame() override; 72 void SubmitWebVRFrame() override;
73 void UpdateWebVRTextureBounds( 73 void UpdateWebVRTextureBounds(
74 int eye, float left, float top, float width, float height) override; 74 int eye, float left, float top, float width, float height) override;
75 gvr::GvrApi* gvr_api() override; 75 gvr::GvrApi* gvr_api() override;
76 void SetGvrPoseForWebVr(gvr::Mat4f pose, int32_t frameNumStarted) override;
76 77
77 void ContentSurfaceChanged( 78 void ContentSurfaceChanged(
78 JNIEnv* env, 79 JNIEnv* env,
79 const base::android::JavaParamRef<jobject>& object, 80 const base::android::JavaParamRef<jobject>& object,
80 jint width, 81 jint width,
81 jint height, 82 jint height,
82 const base::android::JavaParamRef<jobject>& surface); 83 const base::android::JavaParamRef<jobject>& surface);
83 void UiSurfaceChanged( 84 void UiSurfaceChanged(
84 JNIEnv* env, 85 JNIEnv* env,
85 const base::android::JavaParamRef<jobject>& object, 86 const base::android::JavaParamRef<jobject>& object,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool controller_active_ = false; 151 bool controller_active_ = false;
151 152
152 gvr::Vec3f target_point_; 153 gvr::Vec3f target_point_;
153 const ContentRectangle* target_element_ = nullptr; 154 const ContentRectangle* target_element_ = nullptr;
154 int ui_tex_width_ = 0; 155 int ui_tex_width_ = 0;
155 int ui_tex_height_ = 0; 156 int ui_tex_height_ = 0;
156 157
157 bool webvr_mode_ = false; 158 bool webvr_mode_ = false;
158 bool webvr_secure_origin_ = false; 159 bool webvr_secure_origin_ = false;
159 int64_t webvr_warning_end_nanos_ = 0; 160 int64_t webvr_warning_end_nanos_ = 0;
161 static constexpr int POSE_QUEUE_SIZE = 8;
162 gvr::Mat4f webvr_head_pose_[POSE_QUEUE_SIZE];
163 int32_t webvr_newest_pose_num_ = 0;
160 164
161 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 165 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
162 166
163 DISALLOW_COPY_AND_ASSIGN(VrShell); 167 DISALLOW_COPY_AND_ASSIGN(VrShell);
164 }; 168 };
165 169
166 bool RegisterVrShell(JNIEnv* env); 170 bool RegisterVrShell(JNIEnv* env);
167 171
168 } // namespace vr_shell 172 } // namespace vr_shell
169 173
170 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 174 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | chrome/browser/android/vr_shell/vr_shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698