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

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp

Issue 1714663002: Attempt to fix the crash in blink Scroll Animator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo scroll animator mac changes Created 4 years, 10 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 | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/animation/CompositorAnimationPlayer.h" 5 #include "platform/animation/CompositorAnimationPlayer.h"
6 6
7 #include "cc/animation/animation_id_provider.h" 7 #include "cc/animation/animation_id_provider.h"
8 #include "platform/animation/CompositorAnimation.h" 8 #include "platform/animation/CompositorAnimation.h"
9 #include "public/platform/WebCompositorAnimationDelegate.h" 9 #include "public/platform/WebCompositorAnimationDelegate.h"
10 #include "public/platform/WebLayer.h" 10 #include "public/platform/WebLayer.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void CompositorAnimationPlayer::abortAnimation(int animationId) 65 void CompositorAnimationPlayer::abortAnimation(int animationId)
66 { 66 {
67 m_animationPlayer->AbortAnimation(animationId); 67 m_animationPlayer->AbortAnimation(animationId);
68 } 68 }
69 69
70 void CompositorAnimationPlayer::NotifyAnimationStarted( 70 void CompositorAnimationPlayer::NotifyAnimationStarted(
71 base::TimeTicks monotonicTime, 71 base::TimeTicks monotonicTime,
72 cc::Animation::TargetProperty targetProperty, 72 cc::Animation::TargetProperty targetProperty,
73 int group) 73 int group)
74 { 74 {
75 ASSERT(m_delegate); 75 if (m_delegate)
76 m_delegate->notifyAnimationStarted((monotonicTime - base::TimeTicks()).InSec ondsF(), group); 76 m_delegate->notifyAnimationStarted((monotonicTime - base::TimeTicks()).I nSecondsF(), group);
77 } 77 }
78 78
79 void CompositorAnimationPlayer::NotifyAnimationFinished( 79 void CompositorAnimationPlayer::NotifyAnimationFinished(
80 base::TimeTicks monotonicTime, 80 base::TimeTicks monotonicTime,
81 cc::Animation::TargetProperty targetProperty, 81 cc::Animation::TargetProperty targetProperty,
82 int group) 82 int group)
83 { 83 {
84 ASSERT(m_delegate); 84 if (m_delegate)
85 m_delegate->notifyAnimationFinished((monotonicTime - base::TimeTicks()).InSe condsF(), group); 85 m_delegate->notifyAnimationFinished((monotonicTime - base::TimeTicks()). InSecondsF(), group);
86 } 86 }
87 87
88 void CompositorAnimationPlayer::NotifyAnimationAborted( 88 void CompositorAnimationPlayer::NotifyAnimationAborted(
89 base::TimeTicks monotonicTime, 89 base::TimeTicks monotonicTime,
90 cc::Animation::TargetProperty targetProperty, 90 cc::Animation::TargetProperty targetProperty,
91 int group) 91 int group)
92 { 92 {
93 ASSERT(m_delegate); 93 if (m_delegate)
94 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSec ondsF(), group); 94 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).I nSecondsF(), group);
95 } 95 }
96 96
97 } // namespace blink 97 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698