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 PaintPropertyTreeBuilder_h | 5 #ifndef PaintPropertyTreeBuilder_h |
6 #define PaintPropertyTreeBuilder_h | 6 #define PaintPropertyTreeBuilder_h |
7 | 7 |
8 #include "platform/geometry/LayoutPoint.h" | 8 #include "platform/geometry/LayoutPoint.h" |
9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // bookkeeping for effect nodes and can generate the effect tree from a DOM-
order traversal. | 69 // bookkeeping for effect nodes and can generate the effect tree from a DOM-
order traversal. |
70 const EffectPaintPropertyNode* currentEffect = nullptr; | 70 const EffectPaintPropertyNode* currentEffect = nullptr; |
71 }; | 71 }; |
72 | 72 |
73 // Creates paint property tree nodes for special things in the layout tree. | 73 // Creates paint property tree nodes for special things in the layout tree. |
74 // Special things include but not limit to: overflow clip, transform, fixed-pos,
animation, | 74 // Special things include but not limit to: overflow clip, transform, fixed-pos,
animation, |
75 // mask, filter, ... etc. | 75 // mask, filter, ... etc. |
76 // It expects to be invoked for each layout tree node in DOM order during InPreP
aint phase. | 76 // It expects to be invoked for each layout tree node in DOM order during InPreP
aint phase. |
77 class PaintPropertyTreeBuilder { | 77 class PaintPropertyTreeBuilder { |
78 public: | 78 public: |
79 void buildTreeRootNodes(FrameView&, PaintPropertyTreeBuilderContext&); | 79 PaintPropertyTreeBuilderContext setupInitialContext(); |
80 void buildTreeNodes(FrameView&, PaintPropertyTreeBuilderContext&); | 80 void buildTreeNodes(FrameView&, PaintPropertyTreeBuilderContext&); |
81 void buildTreeNodesForSelf(const LayoutObject&, PaintPropertyTreeBuilderCont
ext&); | 81 void buildTreeNodesForSelf(const LayoutObject&, PaintPropertyTreeBuilderCont
ext&); |
82 void buildTreeNodesForChildren(const LayoutObject&, PaintPropertyTreeBuilder
Context&); | 82 void buildTreeNodesForChildren(const LayoutObject&, PaintPropertyTreeBuilder
Context&); |
83 | 83 |
84 private: | 84 private: |
85 static void updatePaintOffsetTranslation(const LayoutObject&, PaintPropertyT
reeBuilderContext&); | 85 static void updatePaintOffsetTranslation(const LayoutObject&, PaintPropertyT
reeBuilderContext&); |
86 static void updateTransform(const LayoutObject&, PaintPropertyTreeBuilderCon
text&); | 86 static void updateTransform(const LayoutObject&, PaintPropertyTreeBuilderCon
text&); |
87 static void updateEffect(const LayoutObject&, PaintPropertyTreeBuilderContex
t&); | 87 static void updateEffect(const LayoutObject&, PaintPropertyTreeBuilderContex
t&); |
88 static void updateCssClip(const LayoutObject&, PaintPropertyTreeBuilderConte
xt&); | 88 static void updateCssClip(const LayoutObject&, PaintPropertyTreeBuilderConte
xt&); |
89 static void updateLocalBorderBoxContext(const LayoutObject&, PaintPropertyTr
eeBuilderContext&); | 89 static void updateLocalBorderBoxContext(const LayoutObject&, PaintPropertyTr
eeBuilderContext&); |
90 static void updateScrollbarPaintOffset(const LayoutObject&, const PaintPrope
rtyTreeBuilderContext&); | 90 static void updateScrollbarPaintOffset(const LayoutObject&, const PaintPrope
rtyTreeBuilderContext&); |
91 static void updateMainThreadScrollingReasons(const LayoutObject&, PaintPrope
rtyTreeBuilderContext&); | 91 static void updateMainThreadScrollingReasons(const LayoutObject&, PaintPrope
rtyTreeBuilderContext&); |
92 static void updateOverflowClip(const LayoutObject&, PaintPropertyTreeBuilder
Context&); | 92 static void updateOverflowClip(const LayoutObject&, PaintPropertyTreeBuilder
Context&); |
93 static void updatePerspective(const LayoutObject&, PaintPropertyTreeBuilderC
ontext&); | 93 static void updatePerspective(const LayoutObject&, PaintPropertyTreeBuilderC
ontext&); |
94 static void updateSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPro
pertyTreeBuilderContext&); | 94 static void updateSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPro
pertyTreeBuilderContext&); |
95 static void updateScrollAndScrollTranslation(const LayoutObject&, PaintPrope
rtyTreeBuilderContext&); | 95 static void updateScrollAndScrollTranslation(const LayoutObject&, PaintPrope
rtyTreeBuilderContext&); |
96 static void updateOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBui
lderContext&); | 96 static void updateOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBui
lderContext&); |
97 }; | 97 }; |
98 | 98 |
99 } // namespace blink | 99 } // namespace blink |
100 | 100 |
101 #endif // PaintPropertyTreeBuilder_h | 101 #endif // PaintPropertyTreeBuilder_h |
OLD | NEW |