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

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

Issue 2762003002: Refactor GVR controller gamepad API integration (Closed)
Patch Set: Rebase, no changes 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void DrawElements(const gvr::Mat4f& view_proj_matrix, 123 void DrawElements(const gvr::Mat4f& view_proj_matrix,
124 const std::vector<const ContentRectangle*>& elements); 124 const std::vector<const ContentRectangle*>& elements);
125 std::vector<const ContentRectangle*> GetElementsInDrawOrder( 125 std::vector<const ContentRectangle*> GetElementsInDrawOrder(
126 const gvr::Mat4f& view_matrix, 126 const gvr::Mat4f& view_matrix,
127 const std::vector<const ContentRectangle*>& elements); 127 const std::vector<const ContentRectangle*>& elements);
128 void DrawCursor(const gvr::Mat4f& render_matrix); 128 void DrawCursor(const gvr::Mat4f& render_matrix);
129 bool ShouldDrawWebVr(); 129 bool ShouldDrawWebVr();
130 void DrawWebVr(); 130 void DrawWebVr();
131 bool WebVrPoseByteIsValid(int pose_index_byte); 131 bool WebVrPoseByteIsValid(int pose_index_byte);
132 132
133 void UpdateController(const gvr::Vec3f& forward_vector); 133 void UpdateController();
134 void HandleControllerInput(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();
140 void OnWebVRFrameAvailable(); 141 void OnWebVRFrameAvailable();
141 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); 142 bool GetPixelEncodedFrameIndex(uint16_t* frame_index);
142 143
143 void OnVSync(); 144 void OnVSync();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 gvr::Vec3f controller_start_direction_; 236 gvr::Vec3f controller_start_direction_;
236 237
237 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 238 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
238 239
239 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 240 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
240 }; 241 };
241 242
242 } // namespace vr_shell 243 } // namespace vr_shell
243 244
244 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 245 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_delegate.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