| 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 #include "chrome/browser/android/vr_shell/ui_scene.h" | 5 #include "chrome/browser/android/vr_shell/ui_scene.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 | 160 |
| 161 float UiScene::GetBackgroundDistance() const { | 161 float UiScene::GetBackgroundDistance() const { |
| 162 return background_distance_; | 162 return background_distance_; |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool UiScene::GetWebVrRenderingEnabled() const { | 165 bool UiScene::GetWebVrRenderingEnabled() const { |
| 166 return webvr_rendering_enabled_; | 166 return webvr_rendering_enabled_; |
| 167 } | 167 } |
| 168 | 168 |
| 169 void UiScene::SetWebVrRenderingEnabled(bool enabled) { |
| 170 webvr_rendering_enabled_ = enabled; |
| 171 } |
| 172 |
| 169 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const { | 173 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const { |
| 170 return ui_elements_; | 174 return ui_elements_; |
| 171 } | 175 } |
| 172 | 176 |
| 173 UiScene::UiScene() = default; | 177 UiScene::UiScene() = default; |
| 174 | 178 |
| 175 UiScene::~UiScene() = default; | 179 UiScene::~UiScene() = default; |
| 176 | 180 |
| 177 void UiScene::ApplyRecursiveTransforms(UiElement* element) { | 181 void UiScene::ApplyRecursiveTransforms(UiElement* element) { |
| 178 if (!element->dirty) | 182 if (!element->dirty) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 219 |
| 216 // TODO(mthiesse): Move this to UiSceneManager. | 220 // TODO(mthiesse): Move this to UiSceneManager. |
| 217 void UiScene::OnGLInitialized() { | 221 void UiScene::OnGLInitialized() { |
| 218 gl_initialized_ = true; | 222 gl_initialized_ = true; |
| 219 for (const std::unique_ptr<UiElement>& element : ui_elements_) { | 223 for (const std::unique_ptr<UiElement>& element : ui_elements_) { |
| 220 element->Initialize(); | 224 element->Initialize(); |
| 221 } | 225 } |
| 222 } | 226 } |
| 223 | 227 |
| 224 } // namespace vr_shell | 228 } // namespace vr_shell |
| OLD | NEW |