Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "core/animation/KeyframeEffectModel.h" | 35 #include "core/animation/KeyframeEffectModel.h" |
| 36 #include "core/animation/animatable/AnimatableDouble.h" | 36 #include "core/animation/animatable/AnimatableDouble.h" |
| 37 #include "core/animation/animatable/AnimatableFilterOperations.h" | 37 #include "core/animation/animatable/AnimatableFilterOperations.h" |
| 38 #include "core/animation/animatable/AnimatableTransform.h" | 38 #include "core/animation/animatable/AnimatableTransform.h" |
| 39 #include "core/animation/animatable/AnimatableValue.h" | 39 #include "core/animation/animatable/AnimatableValue.h" |
| 40 #include "core/dom/DOMNodeIds.h" | 40 #include "core/dom/DOMNodeIds.h" |
| 41 #include "core/layout/LayoutBoxModelObject.h" | 41 #include "core/layout/LayoutBoxModelObject.h" |
| 42 #include "core/layout/LayoutObject.h" | 42 #include "core/layout/LayoutObject.h" |
| 43 #include "core/layout/compositing/CompositedLayerMapping.h" | 43 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 44 #include "core/paint/FilterEffectBuilder.h" | 44 #include "core/paint/FilterEffectBuilder.h" |
| 45 #include "core/paint/ObjectPaintProperties.h" | |
| 45 #include "core/paint/PaintLayer.h" | 46 #include "core/paint/PaintLayer.h" |
| 46 #include "platform/animation/AnimationTranslationUtil.h" | 47 #include "platform/animation/AnimationTranslationUtil.h" |
| 47 #include "platform/animation/CompositorAnimation.h" | 48 #include "platform/animation/CompositorAnimation.h" |
| 48 #include "platform/animation/CompositorAnimationPlayer.h" | 49 #include "platform/animation/CompositorAnimationPlayer.h" |
| 49 #include "platform/animation/CompositorFilterAnimationCurve.h" | 50 #include "platform/animation/CompositorFilterAnimationCurve.h" |
| 50 #include "platform/animation/CompositorFilterKeyframe.h" | 51 #include "platform/animation/CompositorFilterKeyframe.h" |
| 51 #include "platform/animation/CompositorFloatAnimationCurve.h" | 52 #include "platform/animation/CompositorFloatAnimationCurve.h" |
| 52 #include "platform/animation/CompositorFloatKeyframe.h" | 53 #include "platform/animation/CompositorFloatKeyframe.h" |
| 53 #include "platform/animation/CompositorTransformAnimationCurve.h" | 54 #include "platform/animation/CompositorTransformAnimationCurve.h" |
| 54 #include "platform/animation/CompositorTransformKeyframe.h" | 55 #include "platform/animation/CompositorTransformKeyframe.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 (affectsBackdropFilter && | 338 (affectsBackdropFilter && |
| 338 attachedAnimation->affects(targetElement, CSSPropertyBackdropFilter))) | 339 attachedAnimation->affects(targetElement, CSSPropertyBackdropFilter))) |
| 339 attachedAnimation->cancelAnimationOnCompositor(); | 340 attachedAnimation->cancelAnimationOnCompositor(); |
| 340 } | 341 } |
| 341 } | 342 } |
| 342 | 343 |
| 343 bool CompositorAnimations::canStartAnimationOnCompositor( | 344 bool CompositorAnimations::canStartAnimationOnCompositor( |
| 344 const Element& element) { | 345 const Element& element) { |
| 345 if (!Platform::current()->isThreadedAnimationEnabled()) | 346 if (!Platform::current()->isThreadedAnimationEnabled()) |
| 346 return false; | 347 return false; |
| 348 | |
| 349 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | |
| 350 // TODO(wkorman): Consider effect node for opacity. | |
|
wkorman
2016/12/15 23:06:00
Are you adding direct compositing reasons to effec
chrishtr
2016/12/16 00:31:06
You can add it. Follow the lead of the other patch
wkorman
2016/12/16 23:08:00
Will do in subsequent change.
| |
| 351 const TransformPaintPropertyNode* transformNode = | |
| 352 element.layoutObject()->paintProperties()->transform(); | |
| 353 return transformNode && transformNode->hasDirectCompositingReasons(); | |
| 354 } | |
| 355 | |
| 347 return element.layoutObject() && | 356 return element.layoutObject() && |
| 348 element.layoutObject()->compositingState() == PaintsIntoOwnBacking; | 357 element.layoutObject()->compositingState() == PaintsIntoOwnBacking; |
| 349 } | 358 } |
| 350 | 359 |
| 351 void CompositorAnimations::startAnimationOnCompositor( | 360 void CompositorAnimations::startAnimationOnCompositor( |
| 352 const Element& element, | 361 const Element& element, |
| 353 int group, | 362 int group, |
| 354 double startTime, | 363 double startTime, |
| 355 double timeOffset, | 364 double timeOffset, |
| 356 const Timing& timing, | 365 const Timing& timing, |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 616 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 625 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 617 animation->setDirection(compositorTiming.direction); | 626 animation->setDirection(compositorTiming.direction); |
| 618 animation->setPlaybackRate(compositorTiming.playbackRate); | 627 animation->setPlaybackRate(compositorTiming.playbackRate); |
| 619 animation->setFillMode(compositorTiming.fillMode); | 628 animation->setFillMode(compositorTiming.fillMode); |
| 620 animations.push_back(std::move(animation)); | 629 animations.push_back(std::move(animation)); |
| 621 } | 630 } |
| 622 DCHECK(!animations.isEmpty()); | 631 DCHECK(!animations.isEmpty()); |
| 623 } | 632 } |
| 624 | 633 |
| 625 } // namespace blink | 634 } // namespace blink |
| OLD | NEW |