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

Side by Side Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2384593002: Encode frame number in pixel data for pose sync (Closed)
Patch Set: bajones #10: restoreStateFromContext, skip pixel read for non-async mode 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 #include "device/vr/android/gvr/gvr_device_provider.h" 5 #include "device/vr/android/gvr/gvr_device_provider.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/context_utils.h" 9 #include "base/android/context_utils.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 // GvrDelegate implementation 60 // GvrDelegate implementation
61 void SetWebVRSecureOrigin(bool secure_origin) override {} 61 void SetWebVRSecureOrigin(bool secure_origin) override {}
62 void SubmitWebVRFrame() override {} 62 void SubmitWebVRFrame() override {}
63 void UpdateWebVRTextureBounds(int eye, 63 void UpdateWebVRTextureBounds(int eye,
64 float left, 64 float left,
65 float top, 65 float top,
66 float width, 66 float width,
67 float height) override {} 67 float height) override {}
68 void SetGvrPoseForWebVr(gvr::Mat4f pose, uint32_t frameNumStarted) override{};
mthiesse 2016/10/04 21:19:16 Same comment about function signature applies here
mthiesse 2016/10/04 21:19:16 nit: space after override
klausw 2016/10/04 23:08:14 I can't do that. Presubmit insists on me running "
klausw 2016/10/04 23:08:14 renamed to pose_index.
dcheng 2016/10/04 23:19:06 There's a stray semi-colon, that's why clang-forma
klausw 2016/10/04 23:56:42 Ah, thanks for spotting it. Fixed.
68 69
69 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); } 70 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); }
70 71
71 private: 72 private:
72 base::android::ScopedJavaGlobalRef<jobject> j_device_; 73 base::android::ScopedJavaGlobalRef<jobject> j_device_;
73 std::unique_ptr<gvr::GvrApi> gvr_api_; 74 std::unique_ptr<gvr::GvrApi> gvr_api_;
74 }; 75 };
75 76
76 GvrDeviceProvider::GvrDeviceProvider() 77 GvrDeviceProvider::GvrDeviceProvider()
77 : VRDeviceProvider(), 78 : VRDeviceProvider(),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 146
146 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) { 147 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) {
147 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 148 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
148 149
149 vr_device_->SetDelegate(delegate); 150 vr_device_->SetDelegate(delegate);
150 GamepadDataFetcherManager::GetInstance()->AddFactory( 151 GamepadDataFetcherManager::GetInstance()->AddFactory(
151 new GvrGamepadDataFetcher::Factory(delegate, vr_device_->id())); 152 new GvrGamepadDataFetcher::Factory(delegate, vr_device_->id()));
152 } 153 }
153 154
154 } // namespace device 155 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698