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 | 326 |
327 { // Begin block for the lifetime of any filter. | 327 { // Begin block for the lifetime of any filter. |
328 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); | 328 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layer
Fragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPainti
ngInfo, paintFlags); |
329 | 329 |
330 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 330 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
331 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 331 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
332 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); | 332 const ObjectPaintProperties* objectPaintProperties = m_paintLayer.la
youtObject()->objectPaintProperties(); |
333 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); | 333 ASSERT(objectPaintProperties && objectPaintProperties->localBorderBo
xProperties()); |
334 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); | 334 PaintChunkProperties properties(context.getPaintController().current
PaintChunkProperties()); |
335 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); | 335 auto& localBorderBoxProperties = *objectPaintProperties->localBorder
BoxProperties(); |
336 properties.transform = localBorderBoxProperties.propertyTreeState.tr
ansform; | 336 properties.transform = localBorderBoxProperties.geometryPropertyTree
State.transform; |
337 properties.scroll = localBorderBoxProperties.scroll; | 337 properties.scroll = localBorderBoxProperties.scroll; |
338 properties.clip = localBorderBoxProperties.propertyTreeState.clip; | 338 properties.clip = localBorderBoxProperties.geometryPropertyTreeState
.clip; |
339 properties.effect = localBorderBoxProperties.propertyTreeState.effec
t; | 339 properties.effect = localBorderBoxProperties.geometryPropertyTreeSta
te.effect; |
340 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); | 340 properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBa
ckface(); |
341 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); | 341 scopedPaintChunkProperties.emplace(context.getPaintController(), m_p
aintLayer, properties); |
342 } | 342 } |
343 | 343 |
344 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; | 344 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; |
345 bool shouldPaintBackground = shouldPaintContent && !selectionOnly | 345 bool shouldPaintBackground = shouldPaintContent && !selectionOnly |
346 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); | 346 && (isPaintingCompositedBackground || (isPaintingRootLayer && !(pain
tFlags & PaintLayerPaintingSkipRootBackground))); |
347 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); | 347 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintin
gOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackgr
ound); |
348 bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPa
intContent; | 348 bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPa
intContent; |
349 bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForegr
ound; | 349 bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForegr
ound; |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 794 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
795 return; | 795 return; |
796 | 796 |
797 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); | 797 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); |
798 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 798 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
799 | 799 |
800 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 800 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
801 } | 801 } |
802 | 802 |
803 } // namespace blink | 803 } // namespace blink |
OLD | NEW |