Index: chrome/browser/android/vr_shell/ui_elements.h |
diff --git a/chrome/browser/android/vr_shell/ui_elements.h b/chrome/browser/android/vr_shell/ui_elements.h |
index 69ed336d6ba8d3562ab6fe9b4f4b29752a659adb..13165341f72c66ab5d3a356e4adf7c9f0da1d7b8 100644 |
--- a/chrome/browser/android/vr_shell/ui_elements.h |
+++ b/chrome/browser/android/vr_shell/ui_elements.h |
@@ -59,7 +59,7 @@ struct Transform { |
class WorldRectangle { |
public: |
const gvr::Mat4f& TransformMatrix() const; |
- void SetTransform(const Transform& transform); |
+ Transform* GetTransform() { return &transform_; } |
gvr::Vec3f GetCenter() const; |
gvr::Vec3f GetNormal() const; |
@@ -86,6 +86,8 @@ struct ContentRectangle : public WorldRectangle { |
ContentRectangle(); |
~ContentRectangle(); |
+ Transform* GetInheritableTransform() { return &inheritable_transform_; } |
tiborg
2017/03/24 21:58:37
Do we need this? inheritable_transform_ is public
cjgrant
2017/03/27 14:07:52
My motivation: This object started as a struct be
tiborg
2017/03/27 14:30:18
I think we can also make a gradual switch (even th
cjgrant
2017/03/27 15:20:16
Done. Lets go all-or-nothing here.
|
+ |
void Animate(int64_t time); |
// Indicates whether the element should be visually rendered. |
@@ -154,6 +156,12 @@ struct ContentRectangle : public WorldRectangle { |
int draw_phase = 1; |
+ // This transform can be used by children to derive position of its parent. |
+ Transform inheritable_transform_; |
tiborg
2017/03/24 21:58:37
Remove trailing _?
cjgrant
2017/03/27 15:20:16
Done.
|
+ |
+ // A flag usable during transformation calculates to avoid duplicate work. |
+ bool dirty; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(ContentRectangle); |
}; |