| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // Creates paint property tree nodes for special things in the layout tree. | 78 // Creates paint property tree nodes for special things in the layout tree. |
| 79 // Special things include but not limit to: overflow clip, transform, fixed-pos, | 79 // Special things include but not limit to: overflow clip, transform, fixed-pos, |
| 80 // animation, mask, filter, ... etc. | 80 // animation, mask, filter, ... etc. |
| 81 // It expects to be invoked for each layout tree node in DOM order during | 81 // It expects to be invoked for each layout tree node in DOM order during |
| 82 // InPrePaint phase. | 82 // InPrePaint phase. |
| 83 class PaintPropertyTreeBuilder { | 83 class PaintPropertyTreeBuilder { |
| 84 public: | 84 public: |
| 85 PaintPropertyTreeBuilderContext setupInitialContext(); | 85 PaintPropertyTreeBuilderContext setupInitialContext(); |
| 86 void buildTreeNodes(FrameView&, PaintPropertyTreeBuilderContext&); | 86 // Update the paint properties for |FrameView| and ensure the context is |
| 87 void buildTreeNodesForSelf(const LayoutObject&, | 87 // up to date. |
| 88 PaintPropertyTreeBuilderContext&); | 88 void updatePropertiesAndContext(FrameView&, PaintPropertyTreeBuilderContext&); |
| 89 void buildTreeNodesForChildren(const LayoutObject&, | 89 |
| 90 PaintPropertyTreeBuilderContext&); | 90 // Update the paint properties that affect this object (e.g., properties like |
| 91 // paint offset translation) and ensure the context is up to date. |
| 92 void updatePropertiesAndContextForSelf(const LayoutObject&, |
| 93 PaintPropertyTreeBuilderContext&); |
| 94 // Update the paint properties that affect children of this object (e.g., |
| 95 // scroll offset transform) and ensure the context is up to date. |
| 96 void updatePropertiesAndContextForChildren(const LayoutObject&, |
| 97 PaintPropertyTreeBuilderContext&); |
| 91 | 98 |
| 92 private: | 99 private: |
| 93 static void updatePaintOffsetTranslation(const LayoutObject&, | 100 static void updatePaintOffsetTranslation(const LayoutObject&, |
| 94 PaintPropertyTreeBuilderContext&); | 101 PaintPropertyTreeBuilderContext&); |
| 95 static void updateTransform(const LayoutObject&, | 102 static void updateTransform(const LayoutObject&, |
| 96 PaintPropertyTreeBuilderContext&); | 103 PaintPropertyTreeBuilderContext&); |
| 97 static void updateTransformForNonRootSVG(const LayoutObject&, | 104 static void updateTransformForNonRootSVG(const LayoutObject&, |
| 98 PaintPropertyTreeBuilderContext&); | 105 PaintPropertyTreeBuilderContext&); |
| 99 static void updateEffect(const LayoutObject&, | 106 static void updateEffect(const LayoutObject&, |
| 100 PaintPropertyTreeBuilderContext&); | 107 PaintPropertyTreeBuilderContext&); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 118 static void updateScrollAndScrollTranslation( | 125 static void updateScrollAndScrollTranslation( |
| 119 const LayoutObject&, | 126 const LayoutObject&, |
| 120 PaintPropertyTreeBuilderContext&); | 127 PaintPropertyTreeBuilderContext&); |
| 121 static void updateOutOfFlowContext(const LayoutObject&, | 128 static void updateOutOfFlowContext(const LayoutObject&, |
| 122 PaintPropertyTreeBuilderContext&); | 129 PaintPropertyTreeBuilderContext&); |
| 123 }; | 130 }; |
| 124 | 131 |
| 125 } // namespace blink | 132 } // namespace blink |
| 126 | 133 |
| 127 #endif // PaintPropertyTreeBuilder_h | 134 #endif // PaintPropertyTreeBuilder_h |
| OLD | NEW |