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

Unified Diff: ui/compositor/layer_animator.cc

Issue 2291923002: Check target value
Patch Set: Test Created 4 years, 4 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/compositor/layer_animation_element.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 2a47bd9ace30403e58be4667cf269eda134b1edd..763a3cb5c886a1d8e9b1c1cef71b8f63ee1d2fd0 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -23,6 +23,7 @@
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/layer_animator_collection.h"
+#include "base/debug/stack_trace.h"
#define SAFE_INVOKE_VOID(function, running_anim, ...) \
if (running_anim.is_sequence_alive()) \
function(running_anim.sequence(), ##__VA_ARGS__)
@@ -79,6 +80,26 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() {
base::TimeDelta::FromMilliseconds(kDefaultTransitionDurationMs));
}
+void Print(const std::string& name, const gfx::Rect& r) {
+ LOG(ERROR) << name << ":" << r.ToString();
+}
+
+void Print(const std::string& name, const gfx::Transform& t) {
+ LOG(ERROR) << name << ":" << t.ToString();
+}
+
+void Print(const std::string& name, float f) {
+ LOG(ERROR) << name << ":" << f;
+}
+
+void Print(const std::string& name, int i) {
+ LOG(ERROR) << name << ":" << i;
+}
+
+void Print(const std::string& name, SkColor c) {
+ LOG(ERROR) << name << ":" << c;
+}
+
// This macro provides the implementation for the setter and getter (well,
// the getter of the target value) for an animated property. For example,
// it is used for the implementations of SetTransform and GetTargetTransform.
@@ -91,7 +112,7 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() {
if (duration.is_zero() && delegate() && \
(preemption_strategy_ != ENQUEUE_NEW_ANIMATION)) { \
StopAnimatingProperty(LayerAnimationElement::property); \
- delegate()->Set##name##FromAnimation(value); \
+ delegate()->Set##name##FromAnimation(value); \
return; \
} \
std::unique_ptr<LayerAnimationElement> element( \
« no previous file with comments | « ui/compositor/layer_animation_element.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698