OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PrePaintTreeWalk_h | 5 #ifndef PrePaintTreeWalk_h |
6 #define PrePaintTreeWalk_h | 6 #define PrePaintTreeWalk_h |
7 | 7 |
8 #include "core/paint/ClipRect.h" | 8 #include "core/paint/ClipRect.h" |
9 #include "core/paint/PaintInvalidator.h" | 9 #include "core/paint/PaintInvalidator.h" |
10 #include "core/paint/PaintPropertyTreeBuilder.h" | 10 #include "core/paint/PaintPropertyTreeBuilder.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 private: | 27 private: |
28 void Walk(FrameView&, const PrePaintTreeWalkContext&); | 28 void Walk(FrameView&, const PrePaintTreeWalkContext&); |
29 void Walk(const LayoutObject&, const PrePaintTreeWalkContext&); | 29 void Walk(const LayoutObject&, const PrePaintTreeWalkContext&); |
30 | 30 |
31 // Invalidates paint-layer painting optimizations, such as subsequence caching | 31 // Invalidates paint-layer painting optimizations, such as subsequence caching |
32 // and empty paint phase optimizations if clips from the context have changed. | 32 // and empty paint phase optimizations if clips from the context have changed. |
33 ALWAYS_INLINE void InvalidatePaintLayerOptimizationsIfNeeded( | 33 ALWAYS_INLINE void InvalidatePaintLayerOptimizationsIfNeeded( |
34 const LayoutObject&, | 34 const LayoutObject&, |
35 PrePaintTreeWalkContext&); | 35 PrePaintTreeWalkContext&); |
36 | 36 |
37 // Returns in |clipRect| the clip applied to children for the given | 37 // Returns the clip applied to children for the given containing block context |
38 // contaiing block context + effect, in the space of ancestorState adjusted | 38 // + effect, in the space of ancestorState adjusted by ancestorPaintOffset. |
39 // by ancestorPaintOffset. | 39 ALWAYS_INLINE LayoutRect ComputeClipRectForContext( |
40 ALWAYS_INLINE void ComputeClipRectForContext( | |
41 const PaintPropertyTreeBuilderContext::ContainingBlockContext&, | 40 const PaintPropertyTreeBuilderContext::ContainingBlockContext&, |
42 const EffectPaintPropertyNode*, | 41 const EffectPaintPropertyNode*, |
43 const PropertyTreeState& ancestor_state, | 42 const PropertyTreeState& ancestor_state, |
44 const LayoutPoint& ancestor_paint_offset, | 43 const LayoutPoint& ancestor_paint_offset); |
45 FloatClipRect&); | |
46 | 44 |
47 bool ALWAYS_INLINE | 45 bool ALWAYS_INLINE |
48 NeedsTreeBuilderContextUpdate(const FrameView&, | 46 NeedsTreeBuilderContextUpdate(const FrameView&, |
49 const PrePaintTreeWalkContext&); | 47 const PrePaintTreeWalkContext&); |
50 bool ALWAYS_INLINE | 48 bool ALWAYS_INLINE |
51 NeedsTreeBuilderContextUpdate(const LayoutObject&, | 49 NeedsTreeBuilderContextUpdate(const LayoutObject&, |
52 const PrePaintTreeWalkContext&); | 50 const PrePaintTreeWalkContext&); |
53 | 51 |
54 PaintPropertyTreeBuilder property_tree_builder_; | 52 PaintPropertyTreeBuilder property_tree_builder_; |
55 PaintInvalidator paint_invalidator_; | 53 PaintInvalidator paint_invalidator_; |
56 }; | 54 }; |
57 | 55 |
58 } // namespace blink | 56 } // namespace blink |
59 | 57 |
60 #endif // PrePaintTreeWalk_h | 58 #endif // PrePaintTreeWalk_h |
OLD | NEW |