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

Unified Diff: ui/compositor/layer_animator.cc

Issue 11453012: Fix black background when locking with fullscreen window: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with ToT Created 8 years 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: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 98261fe539e1e287eb62f6cedcd082f70cc12c8a..71cb0ca7b7acb8d2d5c165a94e76a03d772075a7 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -86,6 +86,14 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() {
base::TimeDelta::FromMilliseconds(kDefaultTransitionDurationMs));
}
+// static
+scoped_ptr<test::AnimationContainerTestHelper>
+LayerAnimator::CreateAnimatorHelperForTest() {
+ scoped_ptr<test::AnimationContainerTestHelper> result;
+ result.reset(new test::AnimationContainerTestHelper(GetAnimationContainer()));
+ return result.Pass();
+}
+
// 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.
@@ -183,7 +191,7 @@ void LayerAnimator::StartTogether(
if (GetAnimationContainer()->is_running())
last_step_time_ = GetAnimationContainer()->last_tick_time();
else
- last_step_time_ = base::TimeTicks::Now();
+ last_step_time_ = GetAnimationContainer()->GetCurrentTime();
}
// Collect all the affected properties.
@@ -678,7 +686,7 @@ bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) {
else if (GetAnimationContainer()->is_running())
start_time = GetAnimationContainer()->last_tick_time();
else
- start_time = base::TimeTicks::Now();
+ start_time = GetAnimationContainer()->GetCurrentTime();
running_animations_.push_back(
RunningAnimation(sequence->AsWeakPtr(), start_time));
« ui/compositor/layer_animator.h ('K') | « ui/compositor/layer_animator.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698