| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/gfx/compositor/test_layer_animation_delegate.h" | |
| 6 | |
| 7 namespace ui { | |
| 8 | |
| 9 TestLayerAnimationDelegate::TestLayerAnimationDelegate() : opacity_(1.0f) { | |
| 10 } | |
| 11 | |
| 12 TestLayerAnimationDelegate::TestLayerAnimationDelegate( | |
| 13 const LayerAnimationDelegate& other) | |
| 14 : bounds_(other.GetBoundsForAnimation()), | |
| 15 transform_(other.GetTransformForAnimation()), | |
| 16 opacity_(other.GetOpacityForAnimation()) { | |
| 17 } | |
| 18 | |
| 19 TestLayerAnimationDelegate::~TestLayerAnimationDelegate() { | |
| 20 } | |
| 21 | |
| 22 void TestLayerAnimationDelegate::SetBoundsFromAnimation( | |
| 23 const gfx::Rect& bounds) { | |
| 24 bounds_ = bounds; | |
| 25 } | |
| 26 | |
| 27 void TestLayerAnimationDelegate::SetTransformFromAnimation( | |
| 28 const Transform& transform) { | |
| 29 transform_ = transform; | |
| 30 } | |
| 31 | |
| 32 void TestLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) { | |
| 33 opacity_ = opacity; | |
| 34 } | |
| 35 | |
| 36 void TestLayerAnimationDelegate::ScheduleDrawForAnimation() { | |
| 37 } | |
| 38 | |
| 39 const gfx::Rect& TestLayerAnimationDelegate::GetBoundsForAnimation() const { | |
| 40 return bounds_; | |
| 41 } | |
| 42 | |
| 43 const Transform& TestLayerAnimationDelegate::GetTransformForAnimation() const { | |
| 44 return transform_; | |
| 45 } | |
| 46 | |
| 47 float TestLayerAnimationDelegate::GetOpacityForAnimation() const { | |
| 48 return opacity_; | |
| 49 } | |
| 50 | |
| 51 } // namespace ui | |
| OLD | NEW |