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 12 matching lines...) Expand all Loading... |
23 struct PaintPropertyTreeBuilderContext { | 23 struct PaintPropertyTreeBuilderContext { |
24 // State that propagates on the containing block chain (and so is adjusted | 24 // State that propagates on the containing block chain (and so is adjusted |
25 // when an absolute or fixed position object is encountered). | 25 // when an absolute or fixed position object is encountered). |
26 struct ContainingBlockContext { | 26 struct ContainingBlockContext { |
27 // The combination of a transform and paint offset describes a linear sp
ace. | 27 // The combination of a transform and paint offset describes a linear sp
ace. |
28 // When a layout object recur to its children, the main context is expec
ted to refer | 28 // When a layout object recur to its children, the main context is expec
ted to refer |
29 // the object's border box, then the callee will derive its own border b
ox by translating | 29 // the object's border box, then the callee will derive its own border b
ox by translating |
30 // the space with its own layout location. | 30 // the space with its own layout location. |
31 TransformPaintPropertyNode* transform = nullptr; | 31 TransformPaintPropertyNode* transform = nullptr; |
32 LayoutPoint paintOffset; | 32 LayoutPoint paintOffset; |
| 33 // Whether newly created children should flatten their inherited transfo
rm |
| 34 // (equivalently, draw into the plane of their parent). Should generally |
| 35 // be updated whenever |transform| is; flattening only needs to happen |
| 36 // to immediate children. |
| 37 bool shouldFlattenInheritedTransform = false; |
| 38 // Rendering context for 3D sorting. See |
| 39 // TransformPaintPropertyNode::renderingContextID. |
| 40 unsigned renderingContextID = 0; |
33 // The clip node describes the accumulated raster clip for the current s
ubtree. | 41 // The clip node describes the accumulated raster clip for the current s
ubtree. |
34 // Note that the computed raster region in canvas space for a clip node
is independent from | 42 // Note that the computed raster region in canvas space for a clip node
is independent from |
35 // the transform and paint offset above. Also the actual raster region m
ay be affected | 43 // the transform and paint offset above. Also the actual raster region m
ay be affected |
36 // by layerization and occlusion tracking. | 44 // by layerization and occlusion tracking. |
37 ClipPaintPropertyNode* clip = nullptr; | 45 ClipPaintPropertyNode* clip = nullptr; |
38 }; | 46 }; |
39 | 47 |
40 ContainingBlockContext current; | 48 ContainingBlockContext current; |
41 | 49 |
42 // Separate context for out-of-flow positioned and fixed positioned elements
are needed | 50 // Separate context for out-of-flow positioned and fixed positioned elements
are needed |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 static void updateOverflowClip(const LayoutObject&, PaintPropertyTreeBuilder
Context&); | 95 static void updateOverflowClip(const LayoutObject&, PaintPropertyTreeBuilder
Context&); |
88 static void updatePerspective(const LayoutObject&, PaintPropertyTreeBuilderC
ontext&); | 96 static void updatePerspective(const LayoutObject&, PaintPropertyTreeBuilderC
ontext&); |
89 static void updateSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPro
pertyTreeBuilderContext&); | 97 static void updateSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPro
pertyTreeBuilderContext&); |
90 static void updateScrollTranslation(const LayoutObject&, PaintPropertyTreeBu
ilderContext&); | 98 static void updateScrollTranslation(const LayoutObject&, PaintPropertyTreeBu
ilderContext&); |
91 static void updateOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBui
lderContext&); | 99 static void updateOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBui
lderContext&); |
92 }; | 100 }; |
93 | 101 |
94 } // namespace blink | 102 } // namespace blink |
95 | 103 |
96 #endif // PaintPropertyTreeBuilder_h | 104 #endif // PaintPropertyTreeBuilder_h |
OLD | NEW |