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

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

Issue 2814443004: Refactor VR math off of GVR types, onto gfx types where possible. (Closed)
Patch Set: Created 3 years, 8 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_UI_SCENE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/android/vr_shell/vr_math.h" 12 #include "device/vr/vr_types.h"
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue; 15 class DictionaryValue;
16 class ListValue; 16 class ListValue;
17 } 17 }
18 18
19 namespace vr_shell { 19 namespace vr_shell {
20 20
21 class Animation; 21 class Animation;
22 struct ContentRectangle; 22 struct ContentRectangle;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 int64_t time_in_micro); 65 int64_t time_in_micro);
66 66
67 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const; 67 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const;
68 68
69 ContentRectangle* GetUiElementById(int element_id); 69 ContentRectangle* GetUiElementById(int element_id);
70 70
71 std::vector<const ContentRectangle*> GetWorldElements() const; 71 std::vector<const ContentRectangle*> GetWorldElements() const;
72 std::vector<const ContentRectangle*> GetHeadLockedElements() const; 72 std::vector<const ContentRectangle*> GetHeadLockedElements() const;
73 bool HasVisibleHeadLockedElements() const; 73 bool HasVisibleHeadLockedElements() const;
74 74
75 const Colorf& GetBackgroundColor() const; 75 const vr::Colorf& GetBackgroundColor() const;
76 float GetBackgroundDistance() const; 76 float GetBackgroundDistance() const;
77 bool GetWebVrRenderingEnabled() const; 77 bool GetWebVrRenderingEnabled() const;
78 78
79 private: 79 private:
80 void ApplyRecursiveTransforms(ContentRectangle* element); 80 void ApplyRecursiveTransforms(ContentRectangle* element);
81 void ApplyDictToElement(const base::DictionaryValue& dict, 81 void ApplyDictToElement(const base::DictionaryValue& dict,
82 ContentRectangle* element); 82 ContentRectangle* element);
83 83
84 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; 84 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_;
85 ContentRectangle* content_element_ = nullptr; 85 ContentRectangle* content_element_ = nullptr;
86 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; 86 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f};
87 float background_distance_ = 10.0f; 87 float background_distance_ = 10.0f;
88 bool webvr_rendering_enabled_ = true; 88 bool webvr_rendering_enabled_ = true;
89 89
90 DISALLOW_COPY_AND_ASSIGN(UiScene); 90 DISALLOW_COPY_AND_ASSIGN(UiScene);
91 }; 91 };
92 92
93 } // namespace vr_shell 93 } // namespace vr_shell
94 94
95 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 95 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698