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

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

Issue 2384263003: Reflow comments in core/animation and subdirs (Closed)
Patch Set: Created 4 years, 2 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
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 !targetElement.layoutObject()->isTransformApplicable()) { 244 !targetElement.layoutObject()->isTransformApplicable()) {
245 return false; 245 return false;
246 } 246 }
247 transformPropertyCount++; 247 transformPropertyCount++;
248 } 248 }
249 249
250 const PropertySpecificKeyframeVector& keyframes = 250 const PropertySpecificKeyframeVector& keyframes =
251 keyframeEffect.getPropertySpecificKeyframes(property); 251 keyframeEffect.getPropertySpecificKeyframes(property);
252 DCHECK_GE(keyframes.size(), 2U); 252 DCHECK_GE(keyframes.size(), 2U);
253 for (const auto& keyframe : keyframes) { 253 for (const auto& keyframe : keyframes) {
254 // FIXME: Determine candidacy based on the CSSValue instead of a snapshot AnimatableValue. 254 // FIXME: Determine candidacy based on the CSSValue instead of a snapshot
255 // AnimatableValue.
255 bool isNeutralKeyframe = 256 bool isNeutralKeyframe =
256 keyframe->isCSSPropertySpecificKeyframe() && 257 keyframe->isCSSPropertySpecificKeyframe() &&
257 !toCSSPropertySpecificKeyframe(keyframe.get())->value() && 258 !toCSSPropertySpecificKeyframe(keyframe.get())->value() &&
258 keyframe->composite() == EffectModel::CompositeAdd; 259 keyframe->composite() == EffectModel::CompositeAdd;
259 if ((keyframe->composite() != EffectModel::CompositeReplace && 260 if ((keyframe->composite() != EffectModel::CompositeReplace &&
260 !isNeutralKeyframe) || 261 !isNeutralKeyframe) ||
261 !keyframe->getAnimatableValue()) 262 !keyframe->getAnimatableValue())
262 return false; 263 return false;
263 264
264 switch (property.cssProperty()) { 265 switch (property.cssProperty()) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer(); 395 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer();
395 if (compositorPlayer) 396 if (compositorPlayer)
396 compositorPlayer->removeAnimation(id); 397 compositorPlayer->removeAnimation(id);
397 } 398 }
398 399
399 void CompositorAnimations::pauseAnimationForTestingOnCompositor( 400 void CompositorAnimations::pauseAnimationForTestingOnCompositor(
400 const Element& element, 401 const Element& element,
401 const Animation& animation, 402 const Animation& animation,
402 int id, 403 int id,
403 double pauseTime) { 404 double pauseTime) {
404 // FIXME: canStartAnimationOnCompositor queries compositingState, which is not necessarily up to date. 405 // FIXME: canStartAnimationOnCompositor queries compositingState, which is not
406 // necessarily up to date.
405 // https://code.google.com/p/chromium/issues/detail?id=339847 407 // https://code.google.com/p/chromium/issues/detail?id=339847
406 DisableCompositingQueryAsserts disabler; 408 DisableCompositingQueryAsserts disabler;
407 409
408 if (!canStartAnimationOnCompositor(element)) { 410 if (!canStartAnimationOnCompositor(element)) {
409 NOTREACHED(); 411 NOTREACHED();
410 return; 412 return;
411 } 413 }
412 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer(); 414 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer();
413 DCHECK(compositorPlayer); 415 DCHECK(compositorPlayer);
414 compositorPlayer->pauseAnimation(id, pauseTime); 416 compositorPlayer->pauseAnimation(id, pauseTime);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 animation->setTimeOffset(compositorTiming.scaledTimeOffset); 620 animation->setTimeOffset(compositorTiming.scaledTimeOffset);
619 animation->setDirection(compositorTiming.direction); 621 animation->setDirection(compositorTiming.direction);
620 animation->setPlaybackRate(compositorTiming.playbackRate); 622 animation->setPlaybackRate(compositorTiming.playbackRate);
621 animation->setFillMode(compositorTiming.fillMode); 623 animation->setFillMode(compositorTiming.fillMode);
622 animations.append(std::move(animation)); 624 animations.append(std::move(animation));
623 } 625 }
624 DCHECK(!animations.isEmpty()); 626 DCHECK(!animations.isEmpty());
625 } 627 }
626 628
627 } // namespace blink 629 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698