| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 413 |
| 414 { // Begin block for the lifetime of any filter. | 414 { // Begin block for the lifetime of any filter. |
| 415 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, | 415 FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, |
| 416 layerFragments.isEmpty() | 416 layerFragments.isEmpty() |
| 417 ? ClipRect() | 417 ? ClipRect() |
| 418 : layerFragments[0].backgroundRect, | 418 : layerFragments[0].backgroundRect, |
| 419 localPaintingInfo, paintFlags); | 419 localPaintingInfo, paintFlags); |
| 420 | 420 |
| 421 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 421 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
| 422 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 422 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 423 const ObjectPaintProperties* objectPaintProperties = | 423 const auto* objectPaintProperties = |
| 424 m_paintLayer.layoutObject()->objectPaintProperties(); | 424 m_paintLayer.layoutObject()->paintProperties(); |
| 425 ASSERT(objectPaintProperties && | 425 ASSERT(objectPaintProperties && |
| 426 objectPaintProperties->localBorderBoxProperties()); | 426 objectPaintProperties->localBorderBoxProperties()); |
| 427 PaintChunkProperties properties( | 427 PaintChunkProperties properties( |
| 428 context.getPaintController().currentPaintChunkProperties()); | 428 context.getPaintController().currentPaintChunkProperties()); |
| 429 auto& localBorderBoxProperties = | 429 auto& localBorderBoxProperties = |
| 430 *objectPaintProperties->localBorderBoxProperties(); | 430 *objectPaintProperties->localBorderBoxProperties(); |
| 431 properties.transform = | 431 properties.transform = |
| 432 localBorderBoxProperties.propertyTreeState.transform(); | 432 localBorderBoxProperties.propertyTreeState.transform(); |
| 433 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); | 433 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); |
| 434 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); | 434 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 859 |
| 860 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), clipType, | 860 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), clipType, |
| 861 clipRect, &paintingInfo, fragment.paginationOffset, | 861 clipRect, &paintingInfo, fragment.paginationOffset, |
| 862 paintFlags, clippingRule); | 862 paintFlags, clippingRule); |
| 863 } | 863 } |
| 864 | 864 |
| 865 LayoutRect newCullRect(clipRect.rect()); | 865 LayoutRect newCullRect(clipRect.rect()); |
| 866 Optional<ScrollRecorder> scrollRecorder; | 866 Optional<ScrollRecorder> scrollRecorder; |
| 867 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); | 867 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); |
| 868 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 868 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 869 const ObjectPaintProperties* objectPaintProperties = | 869 const auto* objectPaintProperties = |
| 870 m_paintLayer.layoutObject()->objectPaintProperties(); | 870 m_paintLayer.layoutObject()->paintProperties(); |
| 871 ASSERT(objectPaintProperties && | 871 ASSERT(objectPaintProperties && |
| 872 objectPaintProperties->localBorderBoxProperties()); | 872 objectPaintProperties->localBorderBoxProperties()); |
| 873 paintOffset += | 873 paintOffset += |
| 874 toSize(objectPaintProperties->localBorderBoxProperties()->paintOffset); | 874 toSize(objectPaintProperties->localBorderBoxProperties()->paintOffset); |
| 875 newCullRect.move(paintingInfo.scrollOffsetAccumulation); | 875 newCullRect.move(paintingInfo.scrollOffsetAccumulation); |
| 876 } else { | 876 } else { |
| 877 paintOffset += toSize(fragment.layerBounds.location()); | 877 paintOffset += toSize(fragment.layerBounds.location()); |
| 878 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { | 878 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { |
| 879 // As a descendant of the root layer, m_paintLayer's painting is not | 879 // As a descendant of the root layer, m_paintLayer's painting is not |
| 880 // controlled by the ScrollRecorders created by BlockPainter of the | 880 // controlled by the ScrollRecorders created by BlockPainter of the |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 | 1071 |
| 1072 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, | 1072 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, |
| 1073 LayoutRect(enclosingIntRect(damageRect)), | 1073 LayoutRect(enclosingIntRect(damageRect)), |
| 1074 paintFlags, LayoutSize()); | 1074 paintFlags, LayoutSize()); |
| 1075 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 1075 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 1076 | 1076 |
| 1077 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 1077 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 } // namespace blink | 1080 } // namespace blink |
| OLD | NEW |