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

Side by Side Diff: Source/core/animation/AnimationTimeline.cpp

Issue 734003002: Revert of Animations: Disable compositor when timeline playback rate is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « Source/core/animation/AnimationPlayer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void AnimationTimeline::setOutdatedAnimationPlayer(AnimationPlayer* player) 229 void AnimationTimeline::setOutdatedAnimationPlayer(AnimationPlayer* player)
230 { 230 {
231 ASSERT(player->outdated()); 231 ASSERT(player->outdated());
232 m_playersNeedingUpdate.add(player); 232 m_playersNeedingUpdate.add(player);
233 if (m_document && m_document->page() && !m_document->page()->animator().isSe rvicingAnimations()) 233 if (m_document && m_document->page() && !m_document->page()->animator().isSe rvicingAnimations())
234 m_timing->serviceOnNextFrame(); 234 m_timing->serviceOnNextFrame();
235 } 235 }
236 236
237 void AnimationTimeline::setPlaybackRate(double playbackRate) 237 void AnimationTimeline::setPlaybackRate(double playbackRate)
238 { 238 {
239 // FIXME: need to invalidate compositor animations
239 m_currentTimeSnapshot = currentTimeInternal(); 240 m_currentTimeSnapshot = currentTimeInternal();
240 m_rawCurrentTimeSnapshot = m_document->animationClock().currentTime() - zero Time(); 241 m_rawCurrentTimeSnapshot = m_document->animationClock().currentTime() - zero Time();
241 m_playbackRate = playbackRate; 242 m_playbackRate = playbackRate;
242 for (auto& player : m_players) {
243 player->setCompositorPending(true);
244 }
245 } 243 }
246 244
247 double AnimationTimeline::playbackRate() const 245 double AnimationTimeline::playbackRate() const
248 { 246 {
249 return m_playbackRate; 247 return m_playbackRate;
250 } 248 }
251 249
252 #if !ENABLE(OILPAN) 250 #if !ENABLE(OILPAN)
253 void AnimationTimeline::detachFromDocument() 251 void AnimationTimeline::detachFromDocument()
254 { 252 {
255 // FIXME: AnimationTimeline should keep Document alive. 253 // FIXME: AnimationTimeline should keep Document alive.
256 m_document = nullptr; 254 m_document = nullptr;
257 } 255 }
258 #endif 256 #endif
259 257
260 void AnimationTimeline::trace(Visitor* visitor) 258 void AnimationTimeline::trace(Visitor* visitor)
261 { 259 {
262 #if ENABLE(OILPAN) 260 #if ENABLE(OILPAN)
263 visitor->trace(m_document); 261 visitor->trace(m_document);
264 visitor->trace(m_timing); 262 visitor->trace(m_timing);
265 visitor->trace(m_playersNeedingUpdate); 263 visitor->trace(m_playersNeedingUpdate);
266 visitor->trace(m_players); 264 visitor->trace(m_players);
267 #endif 265 #endif
268 } 266 }
269 267
270 } // namespace 268 } // namespace
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationPlayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698