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

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

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Revert FrameView.cpp change, re-enable typemap workaround. Created 3 years, 9 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 "device/vr/vr_service.mojom.h" 10 #include "device/vr/vr_service.mojom.h"
11 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h" 11 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h"
12 12
13 namespace gpu {
14 class Mailbox;
15 class SyncToken;
16 }
17
13 namespace device { 18 namespace device {
14 19
15 constexpr gvr::Sizei kInvalidRenderTargetSize = {0, 0}; 20 constexpr gvr::Sizei kInvalidRenderTargetSize = {0, 0};
16 21
17 class DEVICE_VR_EXPORT GvrDelegate { 22 class DEVICE_VR_EXPORT GvrDelegate {
18 public: 23 public:
19 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0; 24 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0;
20 virtual void SubmitWebVRFrame() = 0; 25 virtual void SubmitWebVRFrame(int16_t frame_index,
26 const gpu::Mailbox& mailbox,
27 const gpu::SyncToken& sync_token,
28 mojom::VRSubmitFrameClientPtr) = 0;
21 virtual void UpdateWebVRTextureBounds(int16_t frame_index, 29 virtual void UpdateWebVRTextureBounds(int16_t frame_index,
22 const gvr::Rectf& left_bounds, 30 const gvr::Rectf& left_bounds,
23 const gvr::Rectf& right_bounds) = 0; 31 const gvr::Rectf& right_bounds,
32 const gvr::Sizei& source_size) = 0;
24 virtual void OnVRVsyncProviderRequest( 33 virtual void OnVRVsyncProviderRequest(
25 mojom::VRVSyncProviderRequest request) = 0; 34 mojom::VRVSyncProviderRequest request) = 0;
26 virtual void UpdateVSyncInterval(int64_t timebase_nanos, 35 virtual void UpdateVSyncInterval(int64_t timebase_nanos,
27 double interval_seconds) = 0; 36 double interval_seconds) = 0;
28 virtual bool SupportsPresentation() = 0; 37 virtual bool SupportsPresentation() = 0;
29 virtual void ResetPose() = 0; 38 virtual void ResetPose() = 0;
30 virtual void CreateVRDisplayInfo( 39 virtual void CreateVRDisplayInfo(
31 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback, 40 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback,
32 uint32_t device_id) = 0; 41 uint32_t device_id) = 0;
33 42
(...skipping 18 matching lines...) Expand all
52 protected: 61 protected:
53 virtual ~GvrDelegateProvider() {} 62 virtual ~GvrDelegateProvider() {}
54 63
55 private: 64 private:
56 static base::Callback<GvrDelegateProvider*()> delegate_provider_; 65 static base::Callback<GvrDelegateProvider*()> delegate_provider_;
57 }; 66 };
58 67
59 } // namespace device 68 } // namespace device
60 69
61 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H 70 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698