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

Unified Diff: chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h

Issue 2612333002: Allow VRDisplay to specify which frame the layer bounds should be updated at. (Closed)
Patch Set: Address comments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
diff --git a/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
index a63509e5b0759a0729274c3aba0a09ff0a9e184c..14d6aeae8b32ea834cfb8d59aaa231dd386b7de5 100644
--- a/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
+++ b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
@@ -26,11 +26,13 @@ class NonPresentingGvrDelegate : public device::GvrDelegate,
// GvrDelegate implementation
void SetWebVRSecureOrigin(bool secure_origin) override {}
void SubmitWebVRFrame() override {}
- void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds,
+ void UpdateWebVRTextureBounds(int16_t frame_index,
+ const gvr::Rectf& left_bounds,
const gvr::Rectf& right_bounds) override {}
void SetWebVRRenderSurfaceSize(int width, int height) override {}
gvr::Sizei GetWebVRCompositorSurfaceSize() override {
- return device::kInvalidRenderTargetSize; }
+ return device::kInvalidRenderTargetSize;
+ }
gvr::GvrApi* gvr_api() override { return gvr_api_.get(); }
void OnVRVsyncProviderRequest(
device::mojom::VRVSyncProviderRequest request) override;
@@ -45,8 +47,10 @@ class NonPresentingGvrDelegate : public device::GvrDelegate,
void StopVSyncLoop();
void StartVSyncLoop();
void OnVSync();
- void GetVSync(const GetVSyncCallback& callback);
- device::mojom::VRPosePtr GetPose();
+ void SendVSync(base::TimeDelta time, const GetVSyncCallback& callback);
+
+ // VRVSyncProvider implementation
+ void GetVSync(const GetVSyncCallback& callback) override;
std::unique_ptr<gvr::GvrApi> gvr_api_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
@@ -60,7 +64,6 @@ class NonPresentingGvrDelegate : public device::GvrDelegate,
bool pending_vsync_ = false;
GetVSyncCallback callback_;
bool received_frame_ = false;
- uint32_t pose_index_ = 1;
mojo::Binding<device::mojom::VRVSyncProvider> binding_;
base::WeakPtrFactory<NonPresentingGvrDelegate> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698