| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 | 861 |
| 862 double time_offset = 0; | 862 double time_offset = 0; |
| 863 if (std::isnan(start_time)) { | 863 if (std::isnan(start_time)) { |
| 864 time_offset = | 864 time_offset = |
| 865 reversed ? EffectEnd() - CurrentTimeInternal() : CurrentTimeInternal(); | 865 reversed ? EffectEnd() - CurrentTimeInternal() : CurrentTimeInternal(); |
| 866 time_offset = time_offset / fabs(playback_rate_); | 866 time_offset = time_offset / fabs(playback_rate_); |
| 867 } | 867 } |
| 868 DCHECK_NE(compositor_group_, 0); | 868 DCHECK_NE(compositor_group_, 0); |
| 869 ToKeyframeEffectReadOnly(content_.Get()) | 869 ToKeyframeEffectReadOnly(content_.Get()) |
| 870 ->StartAnimationOnCompositor(compositor_group_, start_time, time_offset, | 870 ->StartAnimationOnCompositor(compositor_group_, start_time, time_offset, |
| 871 playback_rate_); | 871 playback_rate_, |
| 872 compositor_player_->Player()); |
| 872 } | 873 } |
| 873 | 874 |
| 874 void Animation::SetCompositorPending(bool effect_changed) { | 875 void Animation::SetCompositorPending(bool effect_changed) { |
| 875 // FIXME: KeyframeEffect could notify this directly? | 876 // FIXME: KeyframeEffect could notify this directly? |
| 876 if (!HasActiveAnimationsOnCompositor()) { | 877 if (!HasActiveAnimationsOnCompositor()) { |
| 877 DestroyCompositorPlayer(); | 878 DestroyCompositorPlayer(); |
| 878 compositor_state_.reset(); | 879 compositor_state_.reset(); |
| 879 } | 880 } |
| 880 if (effect_changed && compositor_state_) { | 881 if (effect_changed && compositor_state_) { |
| 881 compositor_state_->effect_changed = true; | 882 compositor_state_->effect_changed = true; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 DCHECK(!compositor_player_); | 1287 DCHECK(!compositor_player_); |
| 1287 } | 1288 } |
| 1288 | 1289 |
| 1289 void Animation::CompositorAnimationPlayerHolder::Detach() { | 1290 void Animation::CompositorAnimationPlayerHolder::Detach() { |
| 1290 DCHECK(compositor_player_); | 1291 DCHECK(compositor_player_); |
| 1291 compositor_player_->SetAnimationDelegate(nullptr); | 1292 compositor_player_->SetAnimationDelegate(nullptr); |
| 1292 animation_ = nullptr; | 1293 animation_ = nullptr; |
| 1293 compositor_player_.reset(); | 1294 compositor_player_.reset(); |
| 1294 } | 1295 } |
| 1295 } // namespace blink | 1296 } // namespace blink |
| OLD | NEW |