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

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: rebase 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 #include <utility> 10 #include <utility>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ~VrShellGl() override; 66 ~VrShellGl() override;
67 67
68 void Initialize(); 68 void Initialize();
69 void InitializeGl(gfx::AcceleratedWidget window); 69 void InitializeGl(gfx::AcceleratedWidget window);
70 70
71 void OnTriggerEvent(); 71 void OnTriggerEvent();
72 void OnPause(); 72 void OnPause();
73 void OnResume(); 73 void OnResume();
74 74
75 void SetWebVrMode(bool enabled); 75 void SetWebVrMode(bool enabled);
76 void CreateContentSurface();
76 void ContentBoundsChanged(int width, int height); 77 void ContentBoundsChanged(int width, int height);
77 void ContentPhysicalBoundsChanged(int width, int height); 78 void ContentPhysicalBoundsChanged(int width, int height);
78 void UIBoundsChanged(int width, int height); 79 void UIBoundsChanged(int width, int height);
79 void UIPhysicalBoundsChanged(int width, int height); 80 void UIPhysicalBoundsChanged(int width, int height);
80 base::WeakPtr<VrShellGl> GetWeakPtr(); 81 base::WeakPtr<VrShellGl> GetWeakPtr();
81 82
82 void UpdateWebVRTextureBounds(int16_t frame_index, 83 void UpdateWebVRTextureBounds(int16_t frame_index,
83 const gvr::Rectf& left_bounds, 84 const gvr::Rectf& left_bounds,
84 const gvr::Rectf& right_bounds); 85 const gvr::Rectf& right_bounds);
85 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num); 86 void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num);
(...skipping 21 matching lines...) Expand all
107 const std::vector<const ContentRectangle*>& elements); 108 const std::vector<const ContentRectangle*>& elements);
108 void DrawCursor(const gvr::Mat4f& render_matrix); 109 void DrawCursor(const gvr::Mat4f& render_matrix);
109 void DrawWebVr(); 110 void DrawWebVr();
110 bool WebVrPoseByteIsValid(int pose_index_byte); 111 bool WebVrPoseByteIsValid(int pose_index_byte);
111 112
112 void UpdateController(const gvr::Vec3f& forward_vector); 113 void UpdateController(const gvr::Vec3f& forward_vector);
113 void SendEventsToTarget(InputTarget input_target, int pixel_x, 114 void SendEventsToTarget(InputTarget input_target, int pixel_x,
114 int pixel_y); 115 int pixel_y);
115 void SendGesture(InputTarget input_target, 116 void SendGesture(InputTarget input_target,
116 std::unique_ptr<blink::WebInputEvent> event); 117 std::unique_ptr<blink::WebInputEvent> event);
117 118 void CreateUiSurface();
118 void OnUIFrameAvailable(); 119 void OnUIFrameAvailable();
119 void OnContentFrameAvailable(); 120 void OnContentFrameAvailable();
120 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); 121 bool GetPixelEncodedFrameIndex(uint16_t* frame_index);
121 122
122 void OnVSync(); 123 void OnVSync();
123 124
124 // VRVSyncProvider 125 // VRVSyncProvider
125 void GetVSync(const GetVSyncCallback& callback) override; 126 void GetVSync(const GetVSyncCallback& callback) override;
126 127
127 void ForceExitVr(); 128 void ForceExitVr();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 uint16_t last_frame_index_ = -1; 202 uint16_t last_frame_index_ = -1;
202 203
203 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 204 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
204 205
205 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 206 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
206 }; 207 };
207 208
208 } // namespace vr_shell 209 } // namespace vr_shell
209 210
210 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 211 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.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