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

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

Issue 369793003: Make the web-animations engine use the passed in blink::WebFrameTime values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing remaining usages of -1 in the code. Created 6 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 | « Source/core/animation/DocumentAnimations.h ('k') | Source/core/dom/Document.h » ('j') | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 namespace { 47 namespace {
48 48
49 void updateAnimationTiming(Document& document, TimingUpdateReason reason) 49 void updateAnimationTiming(Document& document, TimingUpdateReason reason)
50 { 50 {
51 document.timeline().serviceAnimations(reason); 51 document.timeline().serviceAnimations(reason);
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume nt, double monotonicAnimationStartTime) 56 void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& docume nt, blink::WebFrameTime frameTime)
57 { 57 {
58 document.animationClock().updateTime(monotonicAnimationStartTime); 58 document.animationClock().updateTime(frameTime);
59 updateAnimationTiming(document, TimingUpdateForAnimationFrame); 59 updateAnimationTiming(document, TimingUpdateForAnimationFrame);
60 } 60 }
61 61
62 void DocumentAnimations::updateOutdatedAnimationPlayersIfNeeded(Document& docume nt) 62 void DocumentAnimations::updateOutdatedAnimationPlayersIfNeeded(Document& docume nt)
63 { 63 {
64 if (needsOutdatedAnimationPlayerUpdate(document)) 64 if (needsOutdatedAnimationPlayerUpdate(document))
65 updateAnimationTiming(document, TimingUpdateOnDemand); 65 updateAnimationTiming(document, TimingUpdateOnDemand);
66 } 66 }
67 67
68 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS SPropertyID property) 68 void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CS SPropertyID property)
(...skipping 18 matching lines...) Expand all
87 void DocumentAnimations::startPendingAnimations(Document& document) 87 void DocumentAnimations::startPendingAnimations(Document& document)
88 { 88 {
89 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); 89 ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean);
90 if (document.compositorPendingAnimations().startPendingAnimations()) { 90 if (document.compositorPendingAnimations().startPendingAnimations()) {
91 ASSERT(document.view()); 91 ASSERT(document.view());
92 document.view()->scheduleAnimation(); 92 document.view()->scheduleAnimation();
93 } 93 }
94 } 94 }
95 95
96 } // namespace WebCore 96 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentAnimations.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698