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

Unified Diff: ui/compositor/test/layer_animator_test_controller.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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.h ('k') | ui/compositor/test/test_compositor_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/layer_animator_test_controller.cc
diff --git a/ui/compositor/test/layer_animator_test_controller.cc b/ui/compositor/test/layer_animator_test_controller.cc
deleted file mode 100644
index 9047f6cb88b96ee8bffc106a901956c29024326a..0000000000000000000000000000000000000000
--- a/ui/compositor/test/layer_animator_test_controller.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/animation/animation.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/test/layer_animator_test_controller.h"
-#include "ui/gfx/frame_time.h"
-#include "ui/gfx/rect.h"
-
-namespace ui {
-
-LayerAnimatorTestController::LayerAnimatorTestController(
- scoped_refptr<LayerAnimator> animator)
- : animator_(animator) {
-}
-
-LayerAnimatorTestController::~LayerAnimatorTestController() {
-}
-
-LayerAnimationSequence* LayerAnimatorTestController::GetRunningSequence(
- LayerAnimationElement::AnimatableProperty property) {
- LayerAnimator::RunningAnimation* running_animation =
- animator_->GetRunningAnimation(property);
- if (running_animation)
- return running_animation->sequence();
- else
- return NULL;
-}
-
-void LayerAnimatorTestController::StartThreadedAnimationsIfNeeded() {
- std::vector<cc::Animation::TargetProperty> threaded_properties;
- threaded_properties.push_back(cc::Animation::Opacity);
- threaded_properties.push_back(cc::Animation::Transform);
-
- for (size_t i = 0; i < threaded_properties.size(); i++) {
- LayerAnimationElement::AnimatableProperty animatable_property =
- LayerAnimationElement::ToAnimatableProperty(threaded_properties[i]);
- LayerAnimationSequence* sequence = GetRunningSequence(animatable_property);
- if (!sequence)
- continue;
-
- LayerAnimationElement* element = sequence->CurrentElement();
- if (!(element->properties() & animatable_property))
- continue;
-
- if (!element->Started() ||
- element->effective_start_time() != base::TimeTicks())
- continue;
-
- animator_->OnThreadedAnimationStarted(
- cc::AnimationEvent(cc::AnimationEvent::Started,
- 0,
- element->animation_group_id(),
- threaded_properties[i],
- gfx::FrameTime::Now()));
- }
-}
-
-} // namespace ui
« no previous file with comments | « ui/compositor/test/layer_animator_test_controller.h ('k') | ui/compositor/test/test_compositor_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698