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 #ifndef BoxPainter_h | 5 #ifndef BoxPainter_h |
6 #define BoxPainter_h | 6 #define BoxPainter_h |
7 | 7 |
8 #include "core/layout/BackgroundBleedAvoidance.h" | 8 #include "core/layout/BackgroundBleedAvoidance.h" |
9 #include "core/paint/BoxPainterBase.h" | 9 #include "core/paint/BoxPainterBase.h" |
10 #include "platform/geometry/LayoutSize.h" | 10 #include "platform/geometry/LayoutSize.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 public: | 33 public: |
34 BoxPainter(const LayoutBox& layout_box) : layout_box_(layout_box) {} | 34 BoxPainter(const LayoutBox& layout_box) : layout_box_(layout_box) {} |
35 void Paint(const PaintInfo&, const LayoutPoint&); | 35 void Paint(const PaintInfo&, const LayoutPoint&); |
36 | 36 |
37 void PaintChildren(const PaintInfo&, const LayoutPoint&); | 37 void PaintChildren(const PaintInfo&, const LayoutPoint&); |
38 void PaintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&); | 38 void PaintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&); |
39 void PaintMask(const PaintInfo&, const LayoutPoint&); | 39 void PaintMask(const PaintInfo&, const LayoutPoint&); |
40 void PaintClippingMask(const PaintInfo&, const LayoutPoint&); | 40 void PaintClippingMask(const PaintInfo&, const LayoutPoint&); |
41 | 41 |
42 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; | |
43 // Returns true if the result fill layers have non-associative blending or | |
44 // compositing mode. (i.e. The rendering will be different without creating | |
45 // isolation group by context.saveLayer().) Note that the output list will be | |
46 // in top-bottom order. | |
47 bool CalculateFillLayerOcclusionCulling( | |
48 FillLayerOcclusionOutputList& reversed_paint_list, | |
49 const FillLayer&); | |
50 | |
51 // Returns true if the fill layer will certainly occlude anything painted | 42 // Returns true if the fill layer will certainly occlude anything painted |
52 // behind it. | 43 // behind it. |
53 static bool IsFillLayerOpaque(const FillLayer&, const LayoutObject&); | 44 static bool IsFillLayerOpaque(const FillLayer&, const LayoutObject&); |
54 | 45 |
55 void PaintFillLayers(const PaintInfo&, | 46 void PaintFillLayers(const PaintInfo&, |
56 const Color&, | 47 const Color&, |
57 const FillLayer&, | 48 const FillLayer&, |
58 const LayoutRect&, | 49 const LayoutRect&, |
59 BackgroundBleedAvoidance = kBackgroundBleedNone, | 50 BackgroundBleedAvoidance = kBackgroundBleedNone, |
60 SkBlendMode = SkBlendMode::kSrcOver, | 51 SkBlendMode = SkBlendMode::kSrcOver, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 const LayoutRect&, | 94 const LayoutRect&, |
104 const Color& background_color, | 95 const Color& background_color, |
105 BackgroundBleedAvoidance = kBackgroundBleedNone); | 96 BackgroundBleedAvoidance = kBackgroundBleedNone); |
106 | 97 |
107 const LayoutBox& layout_box_; | 98 const LayoutBox& layout_box_; |
108 }; | 99 }; |
109 | 100 |
110 } // namespace blink | 101 } // namespace blink |
111 | 102 |
112 #endif | 103 #endif |
OLD | NEW |