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

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

Issue 2861343002: Enable gpu rasterization in the vr shell
Patch Set: additional trace instrumentation Created 3 years, 7 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 "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "device/vr/vr_types.h" 13 #include "device/vr/vr_types.h"
14 14
15 namespace base { 15 namespace base {
16 class ListValue; 16 class ListValue;
17 class TimeTicks; 17 class TimeTicks;
18 } 18 }
19 19
20 namespace vr_shell { 20 namespace vr_shell {
21 21
22 class Animation; 22 class Animation;
23 class UiElement; 23 class UiElement;
24 class VrSurfaceProvider;
24 25
25 class UiScene { 26 class UiScene {
26 public: 27 public:
27 enum Command { 28 enum Command {
28 ADD_ELEMENT, 29 ADD_ELEMENT,
29 UPDATE_ELEMENT, 30 UPDATE_ELEMENT,
30 REMOVE_ELEMENT, 31 REMOVE_ELEMENT,
31 ADD_ANIMATION, 32 ADD_ANIMATION,
32 REMOVE_ANIMATION, 33 REMOVE_ANIMATION,
33 CONFIGURE_SCENE, 34 CONFIGURE_SCENE,
(...skipping 30 matching lines...) Expand all
64 bool HasVisibleHeadLockedElements() const; 65 bool HasVisibleHeadLockedElements() const;
65 66
66 void SetBackgroundColor(const vr::Colorf& color); 67 void SetBackgroundColor(const vr::Colorf& color);
67 const vr::Colorf& GetBackgroundColor() const; 68 const vr::Colorf& GetBackgroundColor() const;
68 void SetBackgroundDistance(float distance); 69 void SetBackgroundDistance(float distance);
69 float GetBackgroundDistance() const; 70 float GetBackgroundDistance() const;
70 71
71 bool GetWebVrRenderingEnabled() const; 72 bool GetWebVrRenderingEnabled() const;
72 void SetWebVrRenderingEnabled(bool enabled); 73 void SetWebVrRenderingEnabled(bool enabled);
73 74
74 void OnGLInitialized(); 75 void OnGLInitialized(VrSurfaceProvider*);
75 76
76 private: 77 private:
77 void ApplyRecursiveTransforms(UiElement* element); 78 void ApplyRecursiveTransforms(UiElement* element);
78 79
79 std::vector<std::unique_ptr<UiElement>> ui_elements_; 80 std::vector<std::unique_ptr<UiElement>> ui_elements_;
80 UiElement* content_element_ = nullptr; 81 UiElement* content_element_ = nullptr;
81 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; 82 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f};
82 float background_distance_ = 10.0f; 83 float background_distance_ = 10.0f;
83 bool webvr_rendering_enabled_ = true; 84 bool webvr_rendering_enabled_ = true;
84 bool gl_initialized_ = false; 85 bool gl_initialized_ = false;
86 VrSurfaceProvider* surface_provider_ = nullptr;
85 87
86 DISALLOW_COPY_AND_ASSIGN(UiScene); 88 DISALLOW_COPY_AND_ASSIGN(UiScene);
87 }; 89 };
88 90
89 } // namespace vr_shell 91 } // namespace vr_shell
90 92
91 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 93 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/ui_element.cc ('k') | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698