| 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_GL_THREAD_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class VrShell; | 21 class VrShell; |
| 22 class VrShellGl; | 22 class VrShellGl; |
| 23 | 23 |
| 24 class VrGLThread : public VrBrowserInterface, public base::Thread { | 24 class VrGLThread : public VrBrowserInterface, public base::Thread { |
| 25 public: | 25 public: |
| 26 VrGLThread( | 26 VrGLThread( |
| 27 const base::WeakPtr<VrShell>& weak_vr_shell, | 27 const base::WeakPtr<VrShell>& weak_vr_shell, |
| 28 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner, |
| 29 gvr_context* gvr_api, | 29 gvr_context* gvr_api, |
| 30 bool initially_web_vr, | 30 bool initially_web_vr, |
| 31 bool in_cct, |
| 31 bool reprojected_rendering); | 32 bool reprojected_rendering); |
| 32 | 33 |
| 33 ~VrGLThread() override; | 34 ~VrGLThread() override; |
| 34 base::WeakPtr<VrShellGl> GetVrShellGl() { return weak_vr_shell_gl_; } | 35 base::WeakPtr<VrShellGl> GetVrShellGl() { return weak_vr_shell_gl_; } |
| 35 base::WeakPtr<UiSceneManager> GetSceneManager() { | 36 base::WeakPtr<UiSceneManager> GetSceneManager() { |
| 36 return weak_scene_manager_; | 37 return weak_scene_manager_; |
| 37 } | 38 } |
| 38 | 39 |
| 39 // VrBrowserInterface implementation. | 40 // VrBrowserInterface implementation. |
| 40 void ContentSurfaceChanged(jobject surface) override; | 41 void ContentSurfaceChanged(jobject surface) override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 60 std::unique_ptr<UiSceneManager> scene_manager_; | 61 std::unique_ptr<UiSceneManager> scene_manager_; |
| 61 base::WeakPtr<UiSceneManager> weak_scene_manager_; | 62 base::WeakPtr<UiSceneManager> weak_scene_manager_; |
| 62 std::unique_ptr<VrShellGl> vr_shell_gl_; | 63 std::unique_ptr<VrShellGl> vr_shell_gl_; |
| 63 base::WeakPtr<VrShellGl> weak_vr_shell_gl_; | 64 base::WeakPtr<VrShellGl> weak_vr_shell_gl_; |
| 64 | 65 |
| 65 // This state is used for initializing vr_shell_gl_. | 66 // This state is used for initializing vr_shell_gl_. |
| 66 base::WeakPtr<VrShell> weak_vr_shell_; | 67 base::WeakPtr<VrShell> weak_vr_shell_; |
| 67 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 68 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 68 gvr_context* gvr_api_; | 69 gvr_context* gvr_api_; |
| 69 bool initially_web_vr_; | 70 bool initially_web_vr_; |
| 71 bool in_cct_; |
| 70 bool reprojected_rendering_; | 72 bool reprojected_rendering_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(VrGLThread); | 74 DISALLOW_COPY_AND_ASSIGN(VrGLThread); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace vr_shell | 77 } // namespace vr_shell |
| 76 | 78 |
| 77 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ | 79 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ |
| OLD | NEW |