| OLD | NEW |
| 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 <chrome/browser/vr/ui_input_manager.h> | 8 #include <chrome/browser/vr/ui_input_manager.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <queue> | 10 #include <queue> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
| 19 #include "chrome/browser/android/vr_shell/vr_controller.h" | 19 #include "chrome/browser/android/vr_shell/vr_controller.h" |
| 20 #include "chrome/browser/android/vr_shell/vr_controller_model.h" | 20 #include "chrome/browser/android/vr_shell/vr_controller_model.h" |
| 21 #include "device/vr/vr_service.mojom.h" | 21 #include "device/vr/vr_service.mojom.h" |
| 22 #include "mojo/public/cpp/bindings/binding.h" | 22 #include "mojo/public/cpp/bindings/binding.h" |
| 23 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 23 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr.h" | 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr.h" |
| 25 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" | 25 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" |
| 26 #include "ui/gfx/geometry/quaternion.h" | 26 #include "ui/gfx/geometry/quaternion.h" |
| 27 #include "ui/gfx/geometry/rect_f.h" | 27 #include "ui/gfx/geometry/rect_f.h" |
| 28 #include "ui/gfx/geometry/size_f.h" |
| 28 #include "ui/gfx/native_widget_types.h" | 29 #include "ui/gfx/native_widget_types.h" |
| 29 | 30 |
| 30 namespace blink { | 31 namespace blink { |
| 31 class WebMouseEvent; | 32 class WebMouseEvent; |
| 32 } // namespace blink | 33 } // namespace blink |
| 33 | 34 |
| 34 namespace gl { | 35 namespace gl { |
| 35 class GLContext; | 36 class GLContext; |
| 36 class GLFence; | 37 class GLFence; |
| 37 class GLSurface; | 38 class GLSurface; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 gfx::Point3F target_point_; | 239 gfx::Point3F target_point_; |
| 239 vr::UiElement* reticle_render_target_ = nullptr; | 240 vr::UiElement* reticle_render_target_ = nullptr; |
| 240 | 241 |
| 241 int content_tex_css_width_ = 0; | 242 int content_tex_css_width_ = 0; |
| 242 int content_tex_css_height_ = 0; | 243 int content_tex_css_height_ = 0; |
| 243 gfx::Size content_tex_physical_size_ = {0, 0}; | 244 gfx::Size content_tex_physical_size_ = {0, 0}; |
| 244 gfx::Size webvr_surface_size_ = {0, 0}; | 245 gfx::Size webvr_surface_size_ = {0, 0}; |
| 245 | 246 |
| 246 std::vector<base::TimeTicks> webvr_time_pose_; | 247 std::vector<base::TimeTicks> webvr_time_pose_; |
| 247 std::vector<base::TimeTicks> webvr_time_js_submit_; | 248 std::vector<base::TimeTicks> webvr_time_js_submit_; |
| 248 | 249 std::vector<bool> webvr_frame_oustanding_; |
| 249 std::vector<gfx::Transform> webvr_head_pose_; | 250 std::vector<gfx::Transform> webvr_head_pose_; |
| 250 | 251 |
| 251 bool web_vr_mode_; | 252 bool web_vr_mode_; |
| 252 bool ready_to_draw_ = false; | 253 bool ready_to_draw_ = false; |
| 253 bool surfaceless_rendering_; | 254 bool surfaceless_rendering_; |
| 254 bool daydream_support_; | 255 bool daydream_support_; |
| 255 | 256 |
| 256 std::unique_ptr<VrController> controller_; | 257 std::unique_ptr<VrController> controller_; |
| 257 | 258 |
| 258 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 259 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 287 std::unique_ptr<vr::UiInputManager> input_manager_; | 288 std::unique_ptr<vr::UiInputManager> input_manager_; |
| 288 | 289 |
| 289 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; | 290 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; |
| 290 | 291 |
| 291 DISALLOW_COPY_AND_ASSIGN(VrShellGl); | 292 DISALLOW_COPY_AND_ASSIGN(VrShellGl); |
| 292 }; | 293 }; |
| 293 | 294 |
| 294 } // namespace vr_shell | 295 } // namespace vr_shell |
| 295 | 296 |
| 296 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ | 297 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ |
| OLD | NEW |