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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/DeprecatedPaintLayerPainter.h" | 6 #include "core/paint/DeprecatedPaintLayerPainter.h" |
7 | 7 |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
11 #include "core/layout/LayoutView.h" | 11 #include "core/layout/LayoutView.h" |
12 #include "core/layout/svg/LayoutSVGResourceClipper.h" | 12 #include "core/layout/svg/LayoutSVGResourceClipper.h" |
13 #include "core/page/Page.h" | 13 #include "core/page/Page.h" |
14 #include "core/paint/CompositingRecorder.h" | 14 #include "core/paint/CompositingRecorder.h" |
15 #include "core/paint/DeprecatedPaintLayer.h" | 15 #include "core/paint/DeprecatedPaintLayer.h" |
16 #include "core/paint/FilterPainter.h" | 16 #include "core/paint/FilterPainter.h" |
17 #include "core/paint/LayerClipRecorder.h" | 17 #include "core/paint/LayerClipRecorder.h" |
| 18 #include "core/paint/LayerFixedPositionRecorder.h" |
18 #include "core/paint/PaintInfo.h" | 19 #include "core/paint/PaintInfo.h" |
19 #include "core/paint/SVGClipPainter.h" | 20 #include "core/paint/SVGClipPainter.h" |
20 #include "core/paint/ScopeRecorder.h" | 21 #include "core/paint/ScopeRecorder.h" |
21 #include "core/paint/ScrollableAreaPainter.h" | 22 #include "core/paint/ScrollableAreaPainter.h" |
22 #include "core/paint/Transform3DRecorder.h" | 23 #include "core/paint/Transform3DRecorder.h" |
23 #include "platform/graphics/GraphicsLayer.h" | 24 #include "platform/graphics/GraphicsLayer.h" |
24 #include "platform/graphics/paint/ClipPathRecorder.h" | 25 #include "platform/graphics/paint/ClipPathRecorder.h" |
25 #include "platform/graphics/paint/ClipRecorder.h" | 26 #include "platform/graphics/paint/ClipRecorder.h" |
26 #include "platform/graphics/paint/CompositingDisplayItem.h" | 27 #include "platform/graphics/paint/CompositingDisplayItem.h" |
27 #include "platform/graphics/paint/DisplayItemList.h" | 28 #include "platform/graphics/paint/DisplayItemList.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 if (shouldSuppressPaintingLayer(&m_paintLayer)) | 73 if (shouldSuppressPaintingLayer(&m_paintLayer)) |
73 return; | 74 return; |
74 | 75 |
75 // If this layer is totally invisible then there is nothing to paint. | 76 // If this layer is totally invisible then there is nothing to paint. |
76 if (!m_paintLayer.layoutObject()->opacity()) | 77 if (!m_paintLayer.layoutObject()->opacity()) |
77 return; | 78 return; |
78 | 79 |
79 if (m_paintLayer.paintsWithTransparency(paintingInfo.paintBehavior)) | 80 if (m_paintLayer.paintsWithTransparency(paintingInfo.paintBehavior)) |
80 paintFlags |= PaintLayerHaveTransparency; | 81 paintFlags |= PaintLayerHaveTransparency; |
81 | 82 |
| 83 LayerFixedPositionRecorder fixedPositionRecorder(*context, *m_paintLayer.lay
outObject()); |
| 84 |
82 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th
e transform twice. | 85 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th
e transform twice. |
83 if (m_paintLayer.paintsWithTransform(paintingInfo.paintBehavior) && !(paintF
lags & PaintLayerAppliedTransform)) { | 86 if (m_paintLayer.paintsWithTransform(paintingInfo.paintBehavior) && !(paintF
lags & PaintLayerAppliedTransform)) { |
84 paintLayerWithTransform(context, paintingInfo, paintFlags); | 87 paintLayerWithTransform(context, paintingInfo, paintFlags); |
85 return; | 88 return; |
86 } | 89 } |
87 | 90 |
88 paintLayerContentsAndReflection(context, paintingInfo, paintFlags); | 91 paintLayerContentsAndReflection(context, paintingInfo, paintFlags); |
89 } | 92 } |
90 | 93 |
91 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex
t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag
s paintFlags, FragmentPolicy fragmentPolicy) | 94 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex
t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag
s paintFlags, FragmentPolicy fragmentPolicy) |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 726 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
724 return; | 727 return; |
725 | 728 |
726 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); | 729 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); |
727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 730 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
728 | 731 |
729 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 732 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
730 } | 733 } |
731 | 734 |
732 } // namespace blink | 735 } // namespace blink |
OLD | NEW |