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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 { // Begin block for the lifetime of any filter. | 321 { // Begin block for the lifetime of any filter. |
322 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); | 322 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); |
323 | 323 |
324 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 324 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
325 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 325 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
326 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); | 326 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); |
327 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); | 327 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); |
328 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); | 328 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); |
329 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); | 329 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); |
330 properties.transform = localBorderBoxProperties.propertyTreeState.tr
ansform; | 330 properties.transform = localBorderBoxProperties.propertyTreeState.tr
ansform; |
| 331 properties.scroll = localBorderBoxProperties.scroll; |
331 properties.clip = localBorderBoxProperties.propertyTreeState.clip; | 332 properties.clip = localBorderBoxProperties.propertyTreeState.clip; |
332 properties.effect = localBorderBoxProperties.propertyTreeState.effec
t; | 333 properties.effect = localBorderBoxProperties.propertyTreeState.effec
t; |
333 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); | 334 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); |
334 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); | 335 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); |
335 } | 336 } |
336 | 337 |
337 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; | 338 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; |
338 bool shouldPaintBackground = shouldPaintContent && !selectionOnly | 339 bool shouldPaintBackground = shouldPaintContent && !selectionOnly |
339 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); | 340 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); |
340 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); | 341 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 786 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
786 return; | 787 return; |
787 | 788 |
788 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); | 789 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); |
789 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 790 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
790 | 791 |
791 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 792 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
792 } | 793 } |
793 | 794 |
794 } // namespace blink | 795 } // namespace blink |
OLD | NEW |