Lines Matching refs:Timing
42 Timing timing;
47 timing.startDelay = 10;
48 timing.fillMode = Timing::FillModeForwards;
49 ASSERT_TRUE(isNull(calculateActiveTime(20, 0, TimedItem::PhaseActive, TimedItem::PhaseBefore, timing)));
50 timing.fillMode = Timing::FillModeNone;
51 ASSERT_TRUE(isNull(calculateActiveTime(20, 0, TimedItem::PhaseActive, TimedItem::PhaseBefore, timing)));
52 timing.fillMode = Timing::FillModeBackwards;
53 ASSERT_EQ(0, calculateActiveTime(20, 0, TimedItem::PhaseActive, TimedItem::PhaseBefore, timing));
54 timing.fillMode = Timing::FillModeBoth;
55 ASSERT_EQ(0, calculateActiveTime(20, 0, TimedItem::PhaseActive, TimedItem::PhaseBefore, timing));
58 timing.startDelay = 10;
60 timing.fillMode = Timing::FillModeNone;
61 ASSERT_TRUE(isNull(calculateActiveTime(20, 15, TimedItem::PhaseBefore, TimedItem::PhaseActive, timing)));
62 timing.fillMode = Timing::FillModeForwards;
63 ASSERT_TRUE(isNull(calculateActiveTime(20, 15, TimedItem::PhaseBefore, TimedItem::PhaseActive, timing)));
65 timing.fillMode = Timing::FillModeNone;
66 ASSERT_TRUE(isNull(calculateActiveTime(20, 15, TimedItem::PhaseAfter, TimedItem::PhaseActive, timing)));
67 timing.fillMode = Timing::FillModeBackwards;
68 ASSERT_TRUE(isNull(calculateActiveTime(20, 15, TimedItem::PhaseAfter, TimedItem::PhaseActive, timing)));
70 timing.fillMode = Timing::FillModeForwards;
71 ASSERT_EQ(5, calculateActiveTime(20, 15, TimedItem::PhaseActive, TimedItem::PhaseActive, timing));
74 timing.startDelay = 10;
75 timing.fillMode = Timing::FillModeForwards;
76 ASSERT_EQ(21, calculateActiveTime(21, 45, TimedItem::PhaseActive, TimedItem::PhaseAfter, timing));
77 timing.fillMode = Timing::FillModeBoth;
78 ASSERT_EQ(21, calculateActiveTime(21, 45, TimedItem::PhaseActive, TimedItem::PhaseAfter, timing));
79 timing.fillMode = Timing::FillModeBackwards;
80 ASSERT_TRUE(isNull(calculateActiveTime(21, 45, TimedItem::PhaseActive, TimedItem::PhaseAfter, timing)));
81 timing.fillMode = Timing::FillModeNone;
82 ASSERT_TRUE(isNull(calculateActiveTime(21, 45, TimedItem::PhaseActive, TimedItem::PhaseAfter, timing)));
85 ASSERT_TRUE(isNull(calculateActiveTime(32, nullValue(), TimedItem::PhaseNone, TimedItem::PhaseNone, timing)));
90 Timing timing;
95 ASSERT_TRUE(isNull(calculateScaledActiveTime(4, nullValue(), 5, timing)));
98 timing.playbackRate = -1;
99 ASSERT_EQ(-5, calculateScaledActiveTime(10, 20, 5, timing));
102 timing.playbackRate = 0;
103 ASSERT_EQ(5, calculateScaledActiveTime(10, 20, 5, timing));
104 timing.playbackRate = 1;
105 ASSERT_EQ(25, calculateScaledActiveTime(10, 20, 5, timing));
110 Timing timing;
115 ASSERT_TRUE(isNull(calculateIterationTime(1, 1, nullValue(), 1, timing)));
118 ASSERT_EQ(0, calculateIterationTime(0, 0, 0, 4, timing));
121 ASSERT_EQ(12, calculateIterationTime(12, 12, 12, 0, timing));
124 timing.iterationCount = 10;
125 ASSERT_EQ(5, calculateIterationTime(10, 100, 25, 4, timing));
126 ASSERT_EQ(7, calculateIterationTime(11, 110, 29, 1, timing));
127 timing.iterationStart = 1.1;
128 ASSERT_EQ(8, calculateIterationTime(12, 120, 20, 7, timing));
133 Timing timing;
138 ASSERT_TRUE(isNull(calculateCurrentIteration(1, 1, nullValue(), timing)));
141 ASSERT_EQ(0, calculateCurrentIteration(1, 1, 0, timing));
144 ASSERT_EQ(1, calculateCurrentIteration(0, 0, 9, timing));
147 timing.iterationStart = 4;
148 timing.iterationCount = 7;
149 ASSERT_EQ(10, calculateCurrentIteration(5, 5, 9, timing));
152 ASSERT_EQ(3, calculateCurrentIteration(3.2, 3.1, 10, timing));
157 Timing timing;
162 ASSERT_TRUE(isNull(calculateDirectedTime(1, 2, nullValue(), timing)));
165 ASSERT_EQ(17, calculateDirectedTime(0, 20, 17, timing));
166 ASSERT_EQ(17, calculateDirectedTime(1, 20, 17, timing));
167 timing.direction = Timing::PlaybackDirectionAlternate;
168 ASSERT_EQ(17, calculateDirectedTime(0, 20, 17, timing));
169 ASSERT_EQ(17, calculateDirectedTime(2, 20, 17, timing));
170 timing.direction = Timing::PlaybackDirectionAlternateReverse;
171 ASSERT_EQ(17, calculateDirectedTime(1, 20, 17, timing));
172 ASSERT_EQ(17, calculateDirectedTime(3, 20, 17, timing));
175 timing.direction = Timing::PlaybackDirectionReverse;
176 ASSERT_EQ(3, calculateDirectedTime(0, 20, 17, timing));
177 ASSERT_EQ(3, calculateDirectedTime(1, 20, 17, timing));
178 timing.direction = Timing::PlaybackDirectionAlternate;
179 ASSERT_EQ(3, calculateDirectedTime(1, 20, 17, timing));
180 ASSERT_EQ(3, calculateDirectedTime(3, 20, 17, timing));
181 timing.direction = Timing::PlaybackDirectionAlternateReverse;
182 ASSERT_EQ(3, calculateDirectedTime(0, 20, 17, timing));
183 ASSERT_EQ(3, calculateDirectedTime(2, 20, 17, timing));
188 Timing timing;
193 ASSERT_TRUE(isNull(calculateTransformedTime(1, 2, nullValue(), timing)));
196 ASSERT_EQ(12, calculateTransformedTime(0, 20, 12, timing));
197 ASSERT_EQ(12, calculateTransformedTime(1, 20, 12, timing));
199 // PlaybackDirectionForwards with timing function
200 timing.timingFunction = StepsTimingFunction::create(4, false /* stepAtStart */);
201 ASSERT_EQ(10, calculateTransformedTime(0, 20, 12, timing));
202 ASSERT_EQ(10, calculateTransformedTime(1, 20, 12, timing));
205 timing.timingFunction = 0;
206 timing.direction = Timing::PlaybackDirectionReverse;
207 ASSERT_EQ(8, calculateTransformedTime(0, 20, 12, timing));
208 ASSERT_EQ(8, calculateTransformedTime(1, 20, 12, timing));
210 // PlaybackDirectionReverse with timing function
211 timing.timingFunction = StepsTimingFunction::create(4, false /* stepAtStart */);
212 ASSERT_EQ(5, calculateTransformedTime(0, 20, 12, timing));
213 ASSERT_EQ(5, calculateTransformedTime(1, 20, 12, timing));
215 // Timing function when directed time is null.
216 ASSERT_TRUE(isNull(calculateTransformedTime(1, 2, nullValue(), timing)));