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

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 #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 unified diff | Download patch
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/vr_service.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(const gvr::Mat4f& pose,
69 uint32_t pose_index) override {}
68 70
69 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); } 71 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); }
70 72
71 private: 73 private:
72 base::android::ScopedJavaGlobalRef<jobject> j_device_; 74 base::android::ScopedJavaGlobalRef<jobject> j_device_;
73 std::unique_ptr<gvr::GvrApi> gvr_api_; 75 std::unique_ptr<gvr::GvrApi> gvr_api_;
74 }; 76 };
75 77
76 GvrDeviceProvider::GvrDeviceProvider() 78 GvrDeviceProvider::GvrDeviceProvider()
77 : VRDeviceProvider(), 79 : VRDeviceProvider(),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 147
146 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) { 148 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) {
147 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 149 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
148 150
149 vr_device_->SetDelegate(delegate); 151 vr_device_->SetDelegate(delegate);
150 GamepadDataFetcherManager::GetInstance()->AddFactory( 152 GamepadDataFetcherManager::GetInstance()->AddFactory(
151 new GvrGamepadDataFetcher::Factory(delegate, vr_device_->id())); 153 new GvrGamepadDataFetcher::Factory(delegate, vr_device_->id()));
152 } 154 }
153 155
154 } // namespace device 156 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/vr_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698