Chromium Code Reviews| 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/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
| 9 #include "core/paint/ClipPathClipper.h" | 9 #include "core/paint/ClipPathClipper.h" |
| 10 #include "core/paint/FilterPainter.h" | 10 #include "core/paint/FilterPainter.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 context.getPaintController().currentPaintChunkProperties()); | 269 context.getPaintController().currentPaintChunkProperties()); |
| 270 auto& localBorderBoxProperties = | 270 auto& localBorderBoxProperties = |
| 271 *objectPaintProperties->localBorderBoxProperties(); | 271 *objectPaintProperties->localBorderBoxProperties(); |
| 272 properties.transform = | 272 properties.transform = |
| 273 localBorderBoxProperties.propertyTreeState.transform(); | 273 localBorderBoxProperties.propertyTreeState.transform(); |
| 274 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); | 274 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); |
| 275 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); | 275 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); |
| 276 properties.effect = localBorderBoxProperties.propertyTreeState.effect(); | 276 properties.effect = localBorderBoxProperties.propertyTreeState.effect(); |
| 277 properties.backfaceHidden = | 277 properties.backfaceHidden = |
| 278 m_paintLayer.layoutObject()->hasHiddenBackface(); | 278 m_paintLayer.layoutObject()->hasHiddenBackface(); |
| 279 properties.willChangeTransform = | |
| 280 m_paintLayer.layoutObject()->styleRef().hasWillChangeCompositingHint(); | |
| 281 | |
| 279 scopedPaintChunkProperties.emplace(context.getPaintController(), | 282 scopedPaintChunkProperties.emplace(context.getPaintController(), |
| 280 m_paintLayer, properties); | 283 m_paintLayer, properties); |
| 281 } | 284 } |
| 282 | 285 |
| 283 DCHECK(m_paintLayer.isSelfPaintingLayer() || | 286 DCHECK(m_paintLayer.isSelfPaintingLayer() || |
| 284 m_paintLayer.hasSelfPaintingLayerDescendant()); | 287 m_paintLayer.hasSelfPaintingLayerDescendant()); |
| 285 DCHECK(!(paintFlags & PaintLayerAppliedTransform)); | 288 DCHECK(!(paintFlags & PaintLayerAppliedTransform)); |
| 286 | 289 |
| 287 bool isSelfPaintingLayer = m_paintLayer.isSelfPaintingLayer(); | 290 bool isSelfPaintingLayer = m_paintLayer.isSelfPaintingLayer(); |
| 288 bool isPaintingOverlayScrollbars = | 291 bool isPaintingOverlayScrollbars = |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 481 context.getPaintController().currentPaintChunkProperties()); | 484 context.getPaintController().currentPaintChunkProperties()); |
| 482 auto& localBorderBoxProperties = | 485 auto& localBorderBoxProperties = |
| 483 *objectPaintProperties->localBorderBoxProperties(); | 486 *objectPaintProperties->localBorderBoxProperties(); |
| 484 properties.transform = | 487 properties.transform = |
| 485 localBorderBoxProperties.propertyTreeState.transform(); | 488 localBorderBoxProperties.propertyTreeState.transform(); |
| 486 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); | 489 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); |
| 487 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); | 490 properties.clip = localBorderBoxProperties.propertyTreeState.clip(); |
| 488 properties.effect = localBorderBoxProperties.propertyTreeState.effect(); | 491 properties.effect = localBorderBoxProperties.propertyTreeState.effect(); |
| 489 properties.backfaceHidden = | 492 properties.backfaceHidden = |
| 490 m_paintLayer.layoutObject()->hasHiddenBackface(); | 493 m_paintLayer.layoutObject()->hasHiddenBackface(); |
| 494 properties.willChangeTransform = m_paintLayer.layoutObject() | |
|
trchen
2016/12/13 22:46:01
I think this is not quite right. For example:
<di
| |
| 495 ->styleRef() | |
| 496 .hasWillChangeCompositingHint(); | |
| 497 | |
| 491 contentScopedPaintChunkProperties.emplace(context.getPaintController(), | 498 contentScopedPaintChunkProperties.emplace(context.getPaintController(), |
| 492 m_paintLayer, properties); | 499 m_paintLayer, properties); |
| 493 } | 500 } |
| 494 | 501 |
| 495 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; | 502 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; |
| 496 bool shouldPaintBackground = | 503 bool shouldPaintBackground = |
| 497 shouldPaintContent && !selectionOnly && | 504 shouldPaintContent && !selectionOnly && |
| 498 (isPaintingCompositedBackground || | 505 (isPaintingCompositedBackground || |
| 499 (isPaintingRootLayer && | 506 (isPaintingRootLayer && |
| 500 !(paintFlags & PaintLayerPaintingSkipRootBackground))); | 507 !(paintFlags & PaintLayerPaintingSkipRootBackground))); |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1123 | 1130 |
| 1124 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, | 1131 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, |
| 1125 LayoutRect(enclosingIntRect(damageRect)), | 1132 LayoutRect(enclosingIntRect(damageRect)), |
| 1126 paintFlags, LayoutSize()); | 1133 paintFlags, LayoutSize()); |
| 1127 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 1134 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 1128 | 1135 |
| 1129 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 1136 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
| 1130 } | 1137 } |
| 1131 | 1138 |
| 1132 } // namespace blink | 1139 } // namespace blink |
| OLD | NEW |