OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/PaintLayerPainter.h" | 5 #include "core/paint/PaintLayerPainter.h" |
6 | 6 |
7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
9 #include "core/layout/LayoutView.h" | 9 #include "core/layout/LayoutView.h" |
10 #include "core/paint/ClipPathClipper.h" | 10 #include "core/paint/ClipPathClipper.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 { // Begin block for the lifetime of any filter. | 326 { // Begin block for the lifetime of any filter. |
327 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); | 327 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); |
328 | 328 |
329 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 329 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
330 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 330 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
331 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); | 331 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); |
332 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); | 332 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); |
333 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); | 333 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); |
334 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); | 334 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); |
335 properties.transform = localBorderBoxProperties.propertyTreeState.tr
ansform; | 335 properties.transform = localBorderBoxProperties.propertyTreeState.tr
ansform; |
| 336 properties.scroll = localBorderBoxProperties.scroll; |
336 properties.clip = localBorderBoxProperties.propertyTreeState.clip; | 337 properties.clip = localBorderBoxProperties.propertyTreeState.clip; |
337 properties.effect = localBorderBoxProperties.propertyTreeState.effec
t; | 338 properties.effect = localBorderBoxProperties.propertyTreeState.effec
t; |
338 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); | 339 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); |
339 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); | 340 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); |
340 } | 341 } |
341 | 342 |
342 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; | 343 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; |
343 bool shouldPaintBackground = shouldPaintContent && !selectionOnly | 344 bool shouldPaintBackground = shouldPaintContent && !selectionOnly |
344 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); | 345 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); |
345 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); | 346 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 791 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
791 return; | 792 return; |
792 | 793 |
793 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); | 794 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); |
794 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 795 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
795 | 796 |
796 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 797 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
797 } | 798 } |
798 | 799 |
799 } // namespace blink | 800 } // namespace blink |
OLD | NEW |