OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/paint/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/dom/DOMNodeIds.h" | 8 #include "core/dom/DOMNodeIds.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/frame/LocalFrameView.h" | 10 #include "core/frame/LocalFrameView.h" |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 PaintPropertyTreeBuilderFragmentContext& context, | 542 PaintPropertyTreeBuilderFragmentContext& context, |
543 bool& force_subtree_update) { | 543 bool& force_subtree_update) { |
544 const ComputedStyle& style = object.StyleRef(); | 544 const ComputedStyle& style = object.StyleRef(); |
545 | 545 |
546 // TODO(trchen): Can't omit effect node if we have 3D children. | 546 // TODO(trchen): Can't omit effect node if we have 3D children. |
547 if (object.NeedsPaintPropertyUpdate() || force_subtree_update) { | 547 if (object.NeedsPaintPropertyUpdate() || force_subtree_update) { |
548 const ClipPaintPropertyNode* output_clip = | 548 const ClipPaintPropertyNode* output_clip = |
549 context.input_clip_of_current_effect; | 549 context.input_clip_of_current_effect; |
550 | 550 |
551 if (NeedsEffect(object)) { | 551 if (NeedsEffect(object)) { |
552 | |
553 // We may begin to composite our subtree prior to an animation starts, | 552 // We may begin to composite our subtree prior to an animation starts, |
554 // but a compositor element ID is only needed when an animation is | 553 // but a compositor element ID is only needed when an animation is |
555 // current. | 554 // current. |
556 CompositingReasons compositing_reasons = kCompositingReasonNone; | 555 CompositingReasons compositing_reasons = kCompositingReasonNone; |
557 if (CompositingReasonFinder::RequiresCompositingForOpacityAnimation( | 556 if (CompositingReasonFinder::RequiresCompositingForOpacityAnimation( |
558 style)) { | 557 style)) { |
559 compositing_reasons = kCompositingReasonActiveAnimation; | 558 compositing_reasons = kCompositingReasonActiveAnimation; |
560 } | 559 } |
561 | 560 |
562 IntRect mask_clip; | 561 IntRect mask_clip; |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 context.force_subtree_update); | 1266 context.force_subtree_update); |
1268 | 1267 |
1269 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); | 1268 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); |
1270 } | 1269 } |
1271 | 1270 |
1272 if (object.CanContainAbsolutePositionObjects()) | 1271 if (object.CanContainAbsolutePositionObjects()) |
1273 context.container_for_absolute_position = &object; | 1272 context.container_for_absolute_position = &object; |
1274 } | 1273 } |
1275 | 1274 |
1276 } // namespace blink | 1275 } // namespace blink |
OLD | NEW |