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

Side by Side Diff: cc/blink/web_animation_impl.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/blink/cc_blink_tests.gyp ('k') | cc/blink/web_display_item_list_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/blink/web_animation_impl.h" 5 #include "cc/blink/web_animation_impl.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_curve.h" 8 #include "cc/animation/animation_curve.h"
9 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
10 #include "cc/blink/web_filter_animation_curve_impl.h" 10 #include "cc/blink/web_filter_animation_curve_impl.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return animation_->time_offset().InSecondsF(); 112 return animation_->time_offset().InSecondsF();
113 } 113 }
114 114
115 void WebCompositorAnimationImpl::setTimeOffset(double monotonic_time) { 115 void WebCompositorAnimationImpl::setTimeOffset(double monotonic_time) {
116 animation_->set_time_offset(base::TimeDelta::FromSecondsD(monotonic_time)); 116 animation_->set_time_offset(base::TimeDelta::FromSecondsD(monotonic_time));
117 } 117 }
118 118
119 blink::WebCompositorAnimation::Direction WebCompositorAnimationImpl::direction() 119 blink::WebCompositorAnimation::Direction WebCompositorAnimationImpl::direction()
120 const { 120 const {
121 switch (animation_->direction()) { 121 switch (animation_->direction()) {
122 case cc::Animation::DIRECTION_NORMAL: 122 case cc::Animation::Normal:
123 return DirectionNormal; 123 return DirectionNormal;
124 case cc::Animation::DIRECTION_REVERSE: 124 case cc::Animation::Reverse:
125 return DirectionReverse; 125 return DirectionReverse;
126 case cc::Animation::DIRECTION_ALTERNATE: 126 case cc::Animation::Alternate:
127 return DirectionAlternate; 127 return DirectionAlternate;
128 case cc::Animation::DIRECTION_ALTERNATE_REVERSE: 128 case cc::Animation::AlternateReverse:
129 return DirectionAlternateReverse; 129 return DirectionAlternateReverse;
130 default: 130 default:
131 NOTREACHED(); 131 NOTREACHED();
132 } 132 }
133 return DirectionNormal; 133 return DirectionNormal;
134 } 134 }
135 135
136 void WebCompositorAnimationImpl::setDirection(Direction direction) { 136 void WebCompositorAnimationImpl::setDirection(Direction direction) {
137 switch (direction) { 137 switch (direction) {
138 case DirectionNormal: 138 case DirectionNormal:
139 animation_->set_direction(cc::Animation::DIRECTION_NORMAL); 139 animation_->set_direction(cc::Animation::Normal);
140 break; 140 break;
141 case DirectionReverse: 141 case DirectionReverse:
142 animation_->set_direction(cc::Animation::DIRECTION_REVERSE); 142 animation_->set_direction(cc::Animation::Reverse);
143 break; 143 break;
144 case DirectionAlternate: 144 case DirectionAlternate:
145 animation_->set_direction(cc::Animation::DIRECTION_ALTERNATE); 145 animation_->set_direction(cc::Animation::Alternate);
146 break; 146 break;
147 case DirectionAlternateReverse: 147 case DirectionAlternateReverse:
148 animation_->set_direction(cc::Animation::DIRECTION_ALTERNATE_REVERSE); 148 animation_->set_direction(cc::Animation::AlternateReverse);
149 break; 149 break;
150 } 150 }
151 } 151 }
152 152
153 double WebCompositorAnimationImpl::playbackRate() const { 153 double WebCompositorAnimationImpl::playbackRate() const {
154 return animation_->playback_rate(); 154 return animation_->playback_rate();
155 } 155 }
156 156
157 void WebCompositorAnimationImpl::setPlaybackRate(double playback_rate) { 157 void WebCompositorAnimationImpl::setPlaybackRate(double playback_rate) {
158 animation_->set_playback_rate(playback_rate); 158 animation_->set_playback_rate(playback_rate);
159 } 159 }
160 160
161 blink::WebCompositorAnimation::FillMode WebCompositorAnimationImpl::fillMode() 161 blink::WebCompositorAnimation::FillMode WebCompositorAnimationImpl::fillMode()
162 const { 162 const {
163 switch (animation_->fill_mode()) { 163 switch (animation_->fill_mode()) {
164 case cc::Animation::FILL_MODE_NONE: 164 case cc::Animation::FillModeNone:
165 return FillModeNone; 165 return FillModeNone;
166 case cc::Animation::FILL_MODE_FORWARDS: 166 case cc::Animation::FillModeForwards:
167 return FillModeForwards; 167 return FillModeForwards;
168 case cc::Animation::FILL_MODE_BACKWARDS: 168 case cc::Animation::FillModeBackwards:
169 return FillModeBackwards; 169 return FillModeBackwards;
170 case cc::Animation::FILL_MODE_BOTH: 170 case cc::Animation::FillModeBoth:
171 return FillModeBoth; 171 return FillModeBoth;
172 default: 172 default:
173 NOTREACHED(); 173 NOTREACHED();
174 } 174 }
175 return FillModeNone; 175 return FillModeNone;
176 } 176 }
177 177
178 void WebCompositorAnimationImpl::setFillMode(FillMode fill_mode) { 178 void WebCompositorAnimationImpl::setFillMode(FillMode fill_mode) {
179 switch (fill_mode) { 179 switch (fill_mode) {
180 case FillModeNone: 180 case FillModeNone:
181 animation_->set_fill_mode(cc::Animation::FILL_MODE_NONE); 181 animation_->set_fill_mode(cc::Animation::FillModeNone);
182 break; 182 break;
183 case FillModeForwards: 183 case FillModeForwards:
184 animation_->set_fill_mode(cc::Animation::FILL_MODE_FORWARDS); 184 animation_->set_fill_mode(cc::Animation::FillModeForwards);
185 break; 185 break;
186 case FillModeBackwards: 186 case FillModeBackwards:
187 animation_->set_fill_mode(cc::Animation::FILL_MODE_BACKWARDS); 187 animation_->set_fill_mode(cc::Animation::FillModeBackwards);
188 break; 188 break;
189 case FillModeBoth: 189 case FillModeBoth:
190 animation_->set_fill_mode(cc::Animation::FILL_MODE_BOTH); 190 animation_->set_fill_mode(cc::Animation::FillModeBoth);
191 break; 191 break;
192 } 192 }
193 } 193 }
194 194
195 scoped_ptr<cc::Animation> WebCompositorAnimationImpl::PassAnimation() { 195 scoped_ptr<cc::Animation> WebCompositorAnimationImpl::PassAnimation() {
196 animation_->set_needs_synchronized_start_time(true); 196 animation_->set_needs_synchronized_start_time(true);
197 return animation_.Pass(); 197 return animation_.Pass();
198 } 198 }
199 199
200 } // namespace cc_blink 200 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/cc_blink_tests.gyp ('k') | cc/blink/web_display_item_list_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698