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

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

Issue 2749703007: Add menu mode plumbing for WebVR mode. (Closed)
Patch Set: Rename JS WebVR rendering functions for clarity. 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 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 #include <utility> 10 #include <utility>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 uint32_t device_id); 109 uint32_t device_id);
110 void SubmitWebVRFrame(int16_t frame_index, const gpu::MailboxHolder& mailbox); 110 void SubmitWebVRFrame(int16_t frame_index, const gpu::MailboxHolder& mailbox);
111 void SetSubmitClient( 111 void SetSubmitClient(
112 device::mojom::VRSubmitFrameClientPtrInfo submit_client_info); 112 device::mojom::VRSubmitFrameClientPtrInfo submit_client_info);
113 113
114 private: 114 private:
115 void GvrInit(gvr_context* gvr_api); 115 void GvrInit(gvr_context* gvr_api);
116 void InitializeRenderer(); 116 void InitializeRenderer();
117 void DrawFrame(int16_t frame_index); 117 void DrawFrame(int16_t frame_index);
118 void DrawVrShellAndUnbind(const gvr::Mat4f& head_pose, gvr::Frame& frame); 118 void DrawVrShellAndUnbind(const gvr::Mat4f& head_pose, gvr::Frame& frame);
119 void DrawUiView(const gvr::Mat4f* head_pose, 119 void DrawUiView(const gvr::Mat4f& head_pose,
120 const std::vector<const ContentRectangle*>& elements, 120 const std::vector<const ContentRectangle*>& elements,
121 const gvr::Sizei& render_size, 121 const gvr::Sizei& render_size,
122 int viewport_offset); 122 int viewport_offset,
123 bool draw_cursor);
123 void DrawElements(const gvr::Mat4f& view_proj_matrix, 124 void DrawElements(const gvr::Mat4f& view_proj_matrix,
124 const gvr::Mat4f& view_matrix,
125 const std::vector<const ContentRectangle*>& elements); 125 const std::vector<const ContentRectangle*>& elements);
126 std::vector<const ContentRectangle*> GetElementsInDrawOrder( 126 std::vector<const ContentRectangle*> GetElementsInDrawOrder(
127 const gvr::Mat4f& view_matrix, 127 const gvr::Mat4f& view_matrix,
128 const std::vector<const ContentRectangle*>& elements); 128 const std::vector<const ContentRectangle*>& elements);
129 void DrawCursor(const gvr::Mat4f& render_matrix); 129 void DrawCursor(const gvr::Mat4f& render_matrix);
130 bool ShouldDrawWebVr();
130 void DrawWebVr(); 131 void DrawWebVr();
131 bool WebVrPoseByteIsValid(int pose_index_byte); 132 bool WebVrPoseByteIsValid(int pose_index_byte);
132 133
133 void UpdateController(const gvr::Vec3f& forward_vector); 134 void UpdateController(const gvr::Vec3f& forward_vector);
134 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y); 135 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y);
135 void SendGesture(InputTarget input_target, 136 void SendGesture(InputTarget input_target,
136 std::unique_ptr<blink::WebInputEvent> event); 137 std::unique_ptr<blink::WebInputEvent> event);
137 void CreateUiSurface(); 138 void CreateUiSurface();
138 void OnUIFrameAvailable(); 139 void OnUIFrameAvailable();
139 void OnContentFrameAvailable(); 140 void OnContentFrameAvailable();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 gvr::Vec3f controller_start_direction_; 237 gvr::Vec3f controller_start_direction_;
237 238
238 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 239 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
239 240
240 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 241 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
241 }; 242 };
242 243
243 } // namespace vr_shell 244 } // namespace vr_shell
244 245
245 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 246 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698