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

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
« no previous file with comments | « chrome/browser/android/vr_shell/easing.cc ('k') | 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 22b0451371c5e9a6c07d65d60f5718cb1f4c1461..e4f31452fe717cab06f9b7892727a07d9ffefc38 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;
- Rectf copy_rect;
- Recti window_rect;
- gvr::Vec3f size;
- gvr::Vec3f translation;
- XAnchoring x_anchoring;
- YAnchoring y_anchoring;
- bool anchor_z;
+ int content_texture_handle = -1;
+ 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);
« no previous file with comments | « chrome/browser/android/vr_shell/easing.cc ('k') | chrome/browser/android/vr_shell/ui_elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698