| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 794 |
| 795 double time_offset = 0; | 795 double time_offset = 0; |
| 796 if (std::isnan(start_time)) { | 796 if (std::isnan(start_time)) { |
| 797 time_offset = | 797 time_offset = |
| 798 reversed ? EffectEnd() - CurrentTimeInternal() : CurrentTimeInternal(); | 798 reversed ? EffectEnd() - CurrentTimeInternal() : CurrentTimeInternal(); |
| 799 time_offset = time_offset / fabs(playback_rate_); | 799 time_offset = time_offset / fabs(playback_rate_); |
| 800 } | 800 } |
| 801 DCHECK_NE(compositor_group_, 0); | 801 DCHECK_NE(compositor_group_, 0); |
| 802 return ToKeyframeEffectReadOnly(content_.Get()) | 802 return ToKeyframeEffectReadOnly(content_.Get()) |
| 803 ->MaybeStartAnimationOnCompositor(compositor_group_, start_time, | 803 ->MaybeStartAnimationOnCompositor(compositor_group_, start_time, |
| 804 time_offset, playback_rate_); | 804 time_offset, playback_rate_, |
| 805 compositor_player_->Player()); |
| 805 } | 806 } |
| 806 | 807 |
| 807 void Animation::SetCompositorPending(bool effect_changed) { | 808 void Animation::SetCompositorPending(bool effect_changed) { |
| 808 // FIXME: KeyframeEffect could notify this directly? | 809 // FIXME: KeyframeEffect could notify this directly? |
| 809 if (!HasActiveAnimationsOnCompositor()) { | 810 if (!HasActiveAnimationsOnCompositor()) { |
| 810 DestroyCompositorPlayer(); | 811 DestroyCompositorPlayer(); |
| 811 compositor_state_.reset(); | 812 compositor_state_.reset(); |
| 812 } | 813 } |
| 813 if (effect_changed && compositor_state_) { | 814 if (effect_changed && compositor_state_) { |
| 814 compositor_state_->effect_changed = true; | 815 compositor_state_->effect_changed = true; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 DCHECK(!compositor_player_); | 1211 DCHECK(!compositor_player_); |
| 1211 } | 1212 } |
| 1212 | 1213 |
| 1213 void Animation::CompositorAnimationPlayerHolder::Detach() { | 1214 void Animation::CompositorAnimationPlayerHolder::Detach() { |
| 1214 DCHECK(compositor_player_); | 1215 DCHECK(compositor_player_); |
| 1215 compositor_player_->SetAnimationDelegate(nullptr); | 1216 compositor_player_->SetAnimationDelegate(nullptr); |
| 1216 animation_ = nullptr; | 1217 animation_ = nullptr; |
| 1217 compositor_player_.reset(); | 1218 compositor_player_.reset(); |
| 1218 } | 1219 } |
| 1219 } // namespace blink | 1220 } // namespace blink |
| OLD | NEW |