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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_gl.h

Issue 2683953007: Support rendering Android Native Pages in VR Shell. (Closed)
Patch Set: Created 3 years, 10 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 CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ~VrShellGl() override; 64 ~VrShellGl() override;
65 65
66 void Initialize(); 66 void Initialize();
67 void InitializeGl(gfx::AcceleratedWidget window); 67 void InitializeGl(gfx::AcceleratedWidget window);
68 68
69 void OnTriggerEvent(); 69 void OnTriggerEvent();
70 void OnPause(); 70 void OnPause();
71 void OnResume(); 71 void OnResume();
72 72
73 void SetWebVrMode(bool enabled); 73 void SetWebVrMode(bool enabled);
74 void CreateContentSurface();
74 void ContentBoundsChanged(int width, int height); 75 void ContentBoundsChanged(int width, int height);
75 void ContentPhysicalBoundsChanged(int width, int height); 76 void ContentPhysicalBoundsChanged(int width, int height);
76 void UIBoundsChanged(int width, int height); 77 void UIBoundsChanged(int width, int height);
77 void UIPhysicalBoundsChanged(int width, int height); 78 void UIPhysicalBoundsChanged(int width, int height);
78 base::WeakPtr<VrShellGl> GetWeakPtr(); 79 base::WeakPtr<VrShellGl> GetWeakPtr();
79 80
80 void UpdateWebVRTextureBounds(int16_t frame_index, 81 void UpdateWebVRTextureBounds(int16_t frame_index,
81 const gvr::Rectf& left_bounds, 82 const gvr::Rectf& left_bounds,
82 const gvr::Rectf& right_bounds); 83 const gvr::Rectf& right_bounds);
83 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); 84 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num);
(...skipping 21 matching lines...) Expand all
105 const std::vector<const ContentRectangle*>& elements); 106 const std::vector<const ContentRectangle*>& elements);
106 void DrawCursor(const gvr::Mat4f& render_matrix); 107 void DrawCursor(const gvr::Mat4f& render_matrix);
107 void DrawWebVr(); 108 void DrawWebVr();
108 bool WebVrPoseByteIsValid(int pose_index_byte); 109 bool WebVrPoseByteIsValid(int pose_index_byte);
109 110
110 void UpdateController(const gvr::Vec3f& forward_vector); 111 void UpdateController(const gvr::Vec3f& forward_vector);
111 void SendEventsToTarget(InputTarget input_target, int pixel_x, 112 void SendEventsToTarget(InputTarget input_target, int pixel_x,
112 int pixel_y); 113 int pixel_y);
113 void SendGesture(InputTarget input_target, 114 void SendGesture(InputTarget input_target,
114 std::unique_ptr<blink::WebInputEvent> event); 115 std::unique_ptr<blink::WebInputEvent> event);
115 116 void CreateUiSurface();
116 void OnUIFrameAvailable(); 117 void OnUIFrameAvailable();
117 void OnContentFrameAvailable(); 118 void OnContentFrameAvailable();
118 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); 119 bool GetPixelEncodedFrameIndex(uint16_t* frame_index);
119 120
120 void OnVSync(); 121 void OnVSync();
121 122
122 // VRVSyncProvider 123 // VRVSyncProvider
123 void GetVSync(const GetVSyncCallback& callback) override; 124 void GetVSync(const GetVSyncCallback& callback) override;
124 125
125 void ForceExitVr(); 126 void ForceExitVr();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 uint16_t last_frame_index_ = -1; 200 uint16_t last_frame_index_ = -1;
200 201
201 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 202 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
202 203
203 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 204 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
204 }; 205 };
205 206
206 } // namespace vr_shell 207 } // namespace vr_shell
207 208
208 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 209 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698