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

Side by Side Diff: device/vr/android/gvr/gvr_delegate.h

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
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 DEVICE_VR_ANDROID_GVR_DELEGATE_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H
6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H 6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H
7 7
8 #include "device/vr/android/gvr/gvr_device_provider.h" 8 #include "device/vr/android/gvr/gvr_device_provider.h"
9 #include "device/vr/vr_export.h" 9 #include "device/vr/vr_export.h"
10 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h"
10 11
11 namespace gvr { 12 namespace gvr {
12 class GvrApi; 13 class GvrApi;
13 } // namespace gvr 14 } // namespace gvr
14 15
15 namespace device { 16 namespace device {
16 17
17 class DEVICE_VR_EXPORT GvrDelegateProvider { 18 class DEVICE_VR_EXPORT GvrDelegateProvider {
18 public: 19 public:
19 static void SetInstance(GvrDelegateProvider* delegate_provider); 20 static void SetInstance(GvrDelegateProvider* delegate_provider);
20 static GvrDelegateProvider* GetInstance(); 21 static GvrDelegateProvider* GetInstance();
21 22
22 virtual bool RequestWebVRPresent(GvrDeviceProvider* device_provider) = 0; 23 virtual bool RequestWebVRPresent(GvrDeviceProvider* device_provider) = 0;
23 virtual void ExitWebVRPresent() = 0; 24 virtual void ExitWebVRPresent() = 0;
24 25
25 private: 26 private:
26 static GvrDelegateProvider* delegate_provider_; 27 static GvrDelegateProvider* delegate_provider_;
27 }; 28 };
28 29
29 class DEVICE_VR_EXPORT GvrDelegate { 30 class DEVICE_VR_EXPORT GvrDelegate {
30 public: 31 public:
31 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0; 32 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0;
32 virtual void SubmitWebVRFrame() = 0; 33 virtual void SubmitWebVRFrame() = 0;
33 virtual void UpdateWebVRTextureBounds(int eye, 34 virtual void UpdateWebVRTextureBounds(int eye,
34 float left, 35 float left,
35 float top, 36 float top,
36 float width, 37 float width,
37 float height) = 0; 38 float height) = 0;
38 39 virtual void SetGvrPoseForWebVr(const gvr::Mat4f& pose,
40 uint32_t pose_index) = 0;
39 virtual gvr::GvrApi* gvr_api() = 0; 41 virtual gvr::GvrApi* gvr_api() = 0;
40 }; 42 };
41 43
42 } // namespace device 44 } // namespace device
43 45
44 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H 46 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_renderer.cc ('k') | device/vr/android/gvr/gvr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698