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

Unified Diff: chrome/browser/android/vr_shell/ui_elements.h

Issue 2777633003: Avoid duplicate math when computing VR scene hierarchy. (Closed)
Patch Set: Rever the inheritable transform getter for now - we can make a struct-to-class change later if we w… Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_elements.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fc590f993bf5b8934124cacda5e507e69d7eb5a7 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_; }
mthiesse 2017/03/27 15:31:16 nit: maybe use MutableTransform()? Correct style i
cjgrant 2017/03/27 15:58:24 Done. Good call on that!
gvr::Vec3f GetCenter() const;
gvr::Vec3f GetNormal() const;
@@ -154,6 +154,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;
+
+ // A flag usable during transformation calculates to avoid duplicate work.
+ bool dirty;
+
private:
DISALLOW_COPY_AND_ASSIGN(ContentRectangle);
};
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698