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 "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 context.current.renderingContextID = 0; | 312 context.current.renderingContextID = 0; |
313 } | 313 } |
314 } | 314 } |
315 | 315 |
316 static CompositingReasons compositingReasonsForTransform( | 316 static CompositingReasons compositingReasonsForTransform( |
317 const LayoutObject& object) { | 317 const LayoutObject& object) { |
318 CompositingReasons compositingReasons = CompositingReasonNone; | 318 CompositingReasons compositingReasons = CompositingReasonNone; |
319 if (CompositingReasonFinder::requiresCompositingForTransform(object)) | 319 if (CompositingReasonFinder::requiresCompositingForTransform(object)) |
320 compositingReasons |= CompositingReason3DTransform; | 320 compositingReasons |= CompositingReason3DTransform; |
321 | 321 |
| 322 if (CompositingReasonFinder::requiresCompositingForAnimation( |
| 323 object.styleRef())) |
| 324 compositingReasons |= CompositingReasonActiveAnimation; |
| 325 |
322 if (object.styleRef().hasWillChangeCompositingHint() && | 326 if (object.styleRef().hasWillChangeCompositingHint() && |
323 !object.styleRef().subtreeWillChangeContents()) | 327 !object.styleRef().subtreeWillChangeContents()) |
324 compositingReasons |= CompositingReasonWillChangeCompositingHint; | 328 compositingReasons |= CompositingReasonWillChangeCompositingHint; |
325 | 329 |
326 return compositingReasons; | 330 return compositingReasons; |
327 } | 331 } |
328 | 332 |
329 void PaintPropertyTreeBuilder::updateTransform( | 333 void PaintPropertyTreeBuilder::updateTransform( |
330 const LayoutObject& object, | 334 const LayoutObject& object, |
331 PaintPropertyTreeBuilderContext& context) { | 335 PaintPropertyTreeBuilderContext& context) { |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 updateOverflowClip(object, context); | 963 updateOverflowClip(object, context); |
960 updatePerspective(object, context); | 964 updatePerspective(object, context); |
961 updateSvgLocalToBorderBoxTransform(object, context); | 965 updateSvgLocalToBorderBoxTransform(object, context); |
962 updateScrollAndScrollTranslation(object, context); | 966 updateScrollAndScrollTranslation(object, context); |
963 updateOutOfFlowContext(object, context); | 967 updateOutOfFlowContext(object, context); |
964 | 968 |
965 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 969 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
966 } | 970 } |
967 | 971 |
968 } // namespace blink | 972 } // namespace blink |
OLD | NEW |