| 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/PaintInvalidator.h" | 8 #include "core/paint/PaintInvalidator.h" |
| 9 #include "core/paint/PaintPropertyTreeBuilder.h" | 9 #include "core/paint/PaintPropertyTreeBuilder.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class FrameView; | 13 class FrameView; |
| 14 class LayoutObject; | 14 class LayoutObject; |
| 15 struct PrePaintTreeWalkContext; | 15 struct PrePaintTreeWalkContext; |
| 16 | 16 |
| 17 // This class walks the whole layout tree, beginning from the root FrameView, | 17 // This class walks the whole layout tree, beginning from the root FrameView, |
| 18 // across frame boundaries. Helper classes are called for each tree node to | 18 // across frame boundaries. Helper classes are called for each tree node to |
| 19 // perform actual actions. It expects to be invoked in InPrePaint phase. | 19 // perform actual actions. It expects to be invoked in InPrePaint phase. |
| 20 class PrePaintTreeWalk { | 20 class PrePaintTreeWalk { |
| 21 public: | 21 public: |
| 22 void walk(FrameView& rootFrame); | 22 void walk(FrameView& rootFrame); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 void walk(FrameView&, const PrePaintTreeWalkContext&); | 25 // Throttled rendering (see: FrameView::shouldThrottleRendering()) can prevent |
| 26 void walk(const LayoutObject&, const PrePaintTreeWalkContext&); | 26 // walking into a subtree. |
| 27 enum DescendantsUpdated { FullyUpdated = true, NotFullyUpdated = false }; |
| 28 |
| 29 DescendantsUpdated walk(FrameView&, const PrePaintTreeWalkContext&); |
| 30 DescendantsUpdated walk(const LayoutObject&, const PrePaintTreeWalkContext&); |
| 27 | 31 |
| 28 PaintPropertyTreeBuilder m_propertyTreeBuilder; | 32 PaintPropertyTreeBuilder m_propertyTreeBuilder; |
| 29 PaintInvalidator m_paintInvalidator; | 33 PaintInvalidator m_paintInvalidator; |
| 30 }; | 34 }; |
| 31 | 35 |
| 32 } // namespace blink | 36 } // namespace blink |
| 33 | 37 |
| 34 #endif // PrePaintTreeWalk_h | 38 #endif // PrePaintTreeWalk_h |
| OLD | NEW |