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

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

Issue 2335643002: Add VR Shell animation classes and unit test. (Closed)
Patch Set: Add VR Shell animation classes and unit test. Created 4 years, 3 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
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 22b0451371c5e9a6c07d65d60f5718cb1f4c1461..73cf6cc2e2aedc0f98e8f79e8177882f255f98c1 100644
--- a/chrome/browser/android/vr_shell/ui_elements.h
+++ b/chrome/browser/android/vr_shell/ui_elements.h
@@ -9,11 +9,13 @@
#include <vector>
#include "base/logging.h"
-#include "chrome/browser/android/vr_shell/vr_util.h"
+#include "chrome/browser/android/vr_shell/vr_math.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell {
+class Animation;
+
enum XAnchoring {
XLEFT = 0,
XRIGHT,
@@ -61,18 +63,22 @@ struct ContentRectangle : public WorldRectangle {
ContentRectangle();
~ContentRectangle();
- int id;
+ void Animate(int64_t time);
+
+ int id = 0;
+
// samplerExternalOES texture data for desktop content image.
int content_texture_handle;
David Trainor- moved to gerrit 2016/09/14 21:43:30 If we're specifying these in the header, should we
cjgrant 2016/09/16 17:47:08 Done.
- Rectf copy_rect;
- Recti window_rect;
- gvr::Vec3f size;
- gvr::Vec3f translation;
- XAnchoring x_anchoring;
- YAnchoring y_anchoring;
- bool anchor_z;
+ Rectf copy_rect = {0.0f, 0.0f, 0.0f, 0.0f};
+ Recti window_rect = {0.0f, 0.0f, 0.0f, 0.0f};
+ gvr::Vec3f size = {0.0f, 0.0f, 0.0f};
+ gvr::Vec3f translation = {0.0f, 0.0f, 0.0f};
+ XAnchoring x_anchoring = XAnchoring::XNONE;
+ YAnchoring y_anchoring = YAnchoring::YNONE;
+ bool anchor_z = false;
std::vector<float> orientation_axis_angle;
std::vector<float> rotation_axis_angle;
+ std::vector<std::unique_ptr<Animation>> animations;
private:
DISALLOW_COPY_AND_ASSIGN(ContentRectangle);

Powered by Google App Engine
This is Rietveld 408576698