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

Unified Diff: ui/gfx/animation/animation_container.cc

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix DCHECK Created 7 years, 2 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/test/layer_animator_test_controller.cc ('k') | ui/gfx/frame_time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/animation/animation_container.cc
diff --git a/ui/gfx/animation/animation_container.cc b/ui/gfx/animation/animation_container.cc
index c76f1bb77975ce9915a83f5b3b15a510245b0b1b..d8290b2eef6d9ae19960dbf99cb72da60658c6ea 100644
--- a/ui/gfx/animation/animation_container.cc
+++ b/ui/gfx/animation/animation_container.cc
@@ -6,6 +6,7 @@
#include "ui/gfx/animation/animation_container_element.h"
#include "ui/gfx/animation/animation_container_observer.h"
+#include "ui/gfx/frame_time.h"
using base::TimeDelta;
using base::TimeTicks;
@@ -13,7 +14,7 @@ using base::TimeTicks;
namespace gfx {
AnimationContainer::AnimationContainer()
- : last_tick_time_(TimeTicks::Now()),
+ : last_tick_time_(gfx::FrameTime::Now()),
observer_(NULL) {
}
@@ -28,7 +29,7 @@ void AnimationContainer::Start(AnimationContainerElement* element) {
// element isn't running.
if (elements_.empty()) {
- last_tick_time_ = TimeTicks::Now();
+ last_tick_time_ = gfx::FrameTime::Now();
SetMinTimerInterval(element->GetTimerInterval());
} else if (element->GetTimerInterval() < min_timer_interval_) {
SetMinTimerInterval(element->GetTimerInterval());
@@ -61,7 +62,7 @@ void AnimationContainer::Run() {
// ourself here to make sure we're still valid after running all the elements.
scoped_refptr<AnimationContainer> this_ref(this);
- TimeTicks current_time = TimeTicks::Now();
+ TimeTicks current_time = gfx::FrameTime::Now();
last_tick_time_ = current_time;
« no previous file with comments | « ui/compositor/test/layer_animator_test_controller.cc ('k') | ui/gfx/frame_time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698