blob: e6053d6765d04c90f5fa4a36023978500ae18610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
// Copyright (c) 2012 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 "ui/compositor/test/test_layer_animation_delegate.h"
namespace ui {
TestLayerAnimationDelegate::TestLayerAnimationDelegate()
: opacity_(1.0f),
visibility_(true),
brightness_(0.0f),
grayscale_(0.0f),
color_(SK_ColorBLACK) {
}
TestLayerAnimationDelegate::TestLayerAnimationDelegate(
const LayerAnimationDelegate& other)
: bounds_(other.GetBoundsForAnimation()),
transform_(other.GetTransformForAnimation()),
opacity_(other.GetOpacityForAnimation()),
visibility_(other.GetVisibilityForAnimation()),
color_(SK_ColorBLACK) {
}
TestLayerAnimationDelegate::~TestLayerAnimationDelegate() {
}
void TestLayerAnimationDelegate::SetBoundsFromAnimation(
const gfx::Rect& bounds) {
bounds_ = bounds;
}
void TestLayerAnimationDelegate::SetTransformFromAnimation(
const gfx::Transform& transform) {
transform_ = transform;
}
void TestLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) {
opacity_ = opacity;
}
void TestLayerAnimationDelegate::SetVisibilityFromAnimation(bool visibility) {
visibility_ = visibility;
}
void TestLayerAnimationDelegate::SetBrightnessFromAnimation(float brightness) {
brightness_ = brightness;
}
void TestLayerAnimationDelegate::SetGrayscaleFromAnimation(float grayscale) {
grayscale_ = grayscale;
}
void TestLayerAnimationDelegate::SetColorFromAnimation(SkColor color) {
color_ = color;
}
void TestLayerAnimationDelegate::ScheduleDrawForAnimation() {
}
const gfx::Rect& TestLayerAnimationDelegate::GetBoundsForAnimation() const {
return bounds_;
}
gfx::Transform TestLayerAnimationDelegate::GetTransformForAnimation() const {
return transform_;
}
float TestLayerAnimationDelegate::GetOpacityForAnimation() const {
return opacity_;
}
bool TestLayerAnimationDelegate::GetVisibilityForAnimation() const {
return visibility_;
}
float TestLayerAnimationDelegate::GetBrightnessForAnimation() const {
return brightness_;
}
float TestLayerAnimationDelegate::GetGrayscaleForAnimation() const {
return grayscale_;
}
SkColor TestLayerAnimationDelegate::GetColorForAnimation() const {
return color_;
}
float TestLayerAnimationDelegate::GetDeviceScaleFactor() const {
return 1.0f;
}
void TestLayerAnimationDelegate::AddThreadedAnimation(
scoped_ptr<cc::Animation> animation) {
}
void TestLayerAnimationDelegate::RemoveThreadedAnimation(int animation_id) {
}
LayerAnimatorCollection*
TestLayerAnimationDelegate::GetLayerAnimatorCollection() {
return NULL;
}
} // namespace ui
|