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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 { | 60 { |
61 return document.timeline().hasOutdatedAnimation() || document.timeline().nee
dsAnimationTimingUpdate(); | 61 return document.timeline().hasOutdatedAnimation() || document.timeline().nee
dsAnimationTimingUpdate(); |
62 } | 62 } |
63 | 63 |
64 void DocumentAnimations::updateAnimationTimingIfNeeded(Document& document) | 64 void DocumentAnimations::updateAnimationTimingIfNeeded(Document& document) |
65 { | 65 { |
66 if (needsAnimationTimingUpdate(document)) | 66 if (needsAnimationTimingUpdate(document)) |
67 updateAnimationTiming(document, TimingUpdateOnDemand); | 67 updateAnimationTiming(document, TimingUpdateOnDemand); |
68 } | 68 } |
69 | 69 |
70 void DocumentAnimations::updateCompositorAnimations(Document& document) | 70 void DocumentAnimations::updateAnimations(Document& document) |
71 { | 71 { |
72 DCHECK_EQ(document.lifecycle().state(), DocumentLifecycle::CompositingClean)
; | 72 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 73 DCHECK(document.lifecycle().state() >= DocumentLifecycle::CompositingCle
an); |
| 74 else |
| 75 DCHECK(document.lifecycle().state() >= DocumentLifecycle::LayoutClean); |
| 76 |
73 if (document.compositorPendingAnimations().update()) { | 77 if (document.compositorPendingAnimations().update()) { |
74 DCHECK(document.view()); | 78 DCHECK(document.view()); |
75 document.view()->scheduleAnimation(); | 79 document.view()->scheduleAnimation(); |
76 } | 80 } |
77 | 81 |
78 document.timeline().scheduleNextService(); | 82 document.timeline().scheduleNextService(); |
79 } | 83 } |
80 | 84 |
81 } // namespace blink | 85 } // namespace blink |
OLD | NEW |