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

Unified Diff: ui/gfx/vector_icon_types.h

Issue 2870643003: Add support for animations in vector icons. (Closed)
Patch Set: deps, casting 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | ui/vector_icons/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/vector_icon_types.h
diff --git a/ui/gfx/vector_icon_types.h b/ui/gfx/vector_icon_types.h
index b18000b41fe304b8ade4ae9bdde408243741b068..36eb18eb7b884337866dcbe8041fa7a065b8b06d 100644
--- a/ui/gfx/vector_icon_types.h
+++ b/ui/gfx/vector_icon_types.h
@@ -9,6 +9,7 @@
#define UI_GFX_VECTOR_ICON_TYPES_H_
#include "third_party/skia/include/core/SkScalar.h"
+#include "ui/gfx/animation/tween.h"
namespace gfx {
@@ -58,6 +59,12 @@ enum CommandType {
// Flips the x-axis in RTL locales. Default is false, this command sets it to
// true.
FLIPS_IN_RTL,
+ // Defines a timed transition for other elements.
+ TRANSITION_FROM,
+ TRANSITION_TO,
+ // Parameters are delay (ms), duration (ms), and tween type
+ // (gfx::Tween::Type).
+ TRANSITION_END,
// Marks the end of the list of commands.
END
};
@@ -74,10 +81,10 @@ struct PathElement {
};
struct VectorIcon {
- bool is_empty() const { return !path_; }
+ bool is_empty() const { return !path; }
- const gfx::PathElement* path_;
- const gfx::PathElement* path_1x_;
+ const gfx::PathElement* path;
+ const gfx::PathElement* path_1x;
};
// Returns an array of path commands and arguments, terminated by END.
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | ui/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698