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

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

Issue 722203004: Animations: Disable compositor when timeline playback rate is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix oilpan build 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
240 m_currentTimeSnapshot = currentTimeInternal(); 239 m_currentTimeSnapshot = currentTimeInternal();
241 m_rawCurrentTimeSnapshot = m_document->animationClock().currentTime() - zero Time(); 240 m_rawCurrentTimeSnapshot = m_document->animationClock().currentTime() - zero Time();
242 m_playbackRate = playbackRate; 241 m_playbackRate = playbackRate;
242 for (const auto& player : m_players) {
243 player->setCompositorPending(true);
244 }
243 } 245 }
244 246
245 double AnimationTimeline::playbackRate() const 247 double AnimationTimeline::playbackRate() const
246 { 248 {
247 return m_playbackRate; 249 return m_playbackRate;
248 } 250 }
249 251
250 #if !ENABLE(OILPAN) 252 #if !ENABLE(OILPAN)
251 void AnimationTimeline::detachFromDocument() 253 void AnimationTimeline::detachFromDocument()
252 { 254 {
253 // FIXME: AnimationTimeline should keep Document alive. 255 // FIXME: AnimationTimeline should keep Document alive.
254 m_document = nullptr; 256 m_document = nullptr;
255 } 257 }
256 #endif 258 #endif
257 259
258 void AnimationTimeline::trace(Visitor* visitor) 260 void AnimationTimeline::trace(Visitor* visitor)
259 { 261 {
260 #if ENABLE(OILPAN) 262 #if ENABLE(OILPAN)
261 visitor->trace(m_document); 263 visitor->trace(m_document);
262 visitor->trace(m_timing); 264 visitor->trace(m_timing);
263 visitor->trace(m_playersNeedingUpdate); 265 visitor->trace(m_playersNeedingUpdate);
264 visitor->trace(m_players); 266 visitor->trace(m_players);
265 #endif 267 #endif
266 } 268 }
267 269
268 } // namespace 270 } // 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