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

Side by Side Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp

Issue 2948193002: Merge AnimationTimeline and DocumentTimeline (Closed)
Patch Set: Fix rebase error Created 3 years, 5 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 | « third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 #endif 249 #endif
250 250
251 UpdateAnimationsAndScheduleFrameIfNeeded(elapsed, true); 251 UpdateAnimationsAndScheduleFrameIfNeeded(elapsed, true);
252 } 252 }
253 253
254 void SMILTimeContainer::ScheduleAnimationFrame(double delay_time) { 254 void SMILTimeContainer::ScheduleAnimationFrame(double delay_time) {
255 DCHECK(std::isfinite(delay_time)); 255 DCHECK(std::isfinite(delay_time));
256 DCHECK(IsTimelineRunning()); 256 DCHECK(IsTimelineRunning());
257 DCHECK(!wakeup_timer_.IsActive()); 257 DCHECK(!wakeup_timer_.IsActive());
258 258
259 if (delay_time < AnimationTimeline::kMinimumDelay) { 259 if (delay_time < DocumentTimeline::kMinimumDelay) {
260 ServiceOnNextFrame(); 260 ServiceOnNextFrame();
261 } else { 261 } else {
262 ScheduleWakeUp(delay_time - AnimationTimeline::kMinimumDelay, 262 ScheduleWakeUp(delay_time - DocumentTimeline::kMinimumDelay,
263 kFutureAnimationFrame); 263 kFutureAnimationFrame);
264 } 264 }
265 } 265 }
266 266
267 void SMILTimeContainer::CancelAnimationFrame() { 267 void SMILTimeContainer::CancelAnimationFrame() {
268 frame_scheduling_state_ = kIdle; 268 frame_scheduling_state_ = kIdle;
269 wakeup_timer_.Stop(); 269 wakeup_timer_.Stop();
270 } 270 }
271 271
272 void SMILTimeContainer::ScheduleWakeUp( 272 void SMILTimeContainer::ScheduleWakeUp(
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 void SMILTimeContainer::AdvanceFrameForTesting() { 532 void SMILTimeContainer::AdvanceFrameForTesting() {
533 SetElapsed(Elapsed() + kInitialFrameDelay); 533 SetElapsed(Elapsed() + kInitialFrameDelay);
534 } 534 }
535 535
536 DEFINE_TRACE(SMILTimeContainer) { 536 DEFINE_TRACE(SMILTimeContainer) {
537 visitor->Trace(scheduled_animations_); 537 visitor->Trace(scheduled_animations_);
538 visitor->Trace(owner_svg_element_); 538 visitor->Trace(owner_svg_element_);
539 } 539 }
540 540
541 } // namespace blink 541 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698