Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintInvalidator.h |
| diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h |
| index b101354fb5600e6fb31d9d809affade17c33dea9..115ad01f65e2cfa0d2994ecff89c6aff0001e0a2 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h |
| @@ -13,13 +13,17 @@ |
| namespace blink { |
| struct PaintInvalidatorContext { |
| - PaintInvalidatorContext( |
| - const PaintPropertyTreeBuilderContext* tree_builder_context) |
| - : parent_context(nullptr), tree_builder_context_(tree_builder_context) {} |
| + PaintInvalidatorContext() |
| + : parent_context(nullptr), |
| + tree_builder_context_(nullptr) |
| +#if DCHECK_IS_ON() |
| + , |
| + tree_builder_context_actually_needed_(false) |
| +#endif |
| + { |
| + } |
| - PaintInvalidatorContext( |
| - const PaintPropertyTreeBuilderContext* tree_builder_context, |
| - const PaintInvalidatorContext& parent_context) |
| + PaintInvalidatorContext(const PaintInvalidatorContext& parent_context) |
| : parent_context(&parent_context), |
| forced_subtree_invalidation_flags( |
| parent_context.forced_subtree_invalidation_flags), |
| @@ -28,7 +32,13 @@ struct PaintInvalidatorContext { |
| paint_invalidation_container_for_stacked_contents( |
| parent_context.paint_invalidation_container_for_stacked_contents), |
| painting_layer(parent_context.painting_layer), |
| - tree_builder_context_(tree_builder_context) {} |
| + tree_builder_context_(nullptr) |
| +#if DCHECK_IS_ON() |
| + , |
| + tree_builder_context_actually_needed_(false) |
| +#endif |
| + { |
| + } |
| // This method is virtual temporarily to adapt PaintInvalidatorContext and the |
| // legacy PaintInvalidationState for code shared by old code and new code. |
| @@ -106,9 +116,11 @@ struct PaintInvalidatorContext { |
| private: |
| friend class PaintInvalidator; |
| - const PaintPropertyTreeBuilderContext* tree_builder_context_; |
| + const PaintPropertyTreeBuilderFragmentContext* tree_builder_context_; |
|
Xianzhu
2017/05/03 17:29:44
How about "= nullptr" to avoid changes in construc
chrishtr
2017/05/03 18:04:35
Done.
|
| #if DCHECK_IS_ON() |
| + bool tree_builder_context_actually_needed_; |
|
Xianzhu
2017/05/03 17:29:43
How about "= false" to avoid changes in constructo
chrishtr
2017/05/03 18:04:35
Done.
|
| + friend class FindVisualRectNeedingUpdateScope; |
| friend class FindVisualRectNeedingUpdateScopeBase; |
| mutable bool force_visual_rect_update_for_checking_ = false; |
| #endif |
| @@ -116,8 +128,12 @@ struct PaintInvalidatorContext { |
| class PaintInvalidator { |
| public: |
| - void InvalidatePaint(FrameView&, PaintInvalidatorContext&); |
| - void InvalidatePaint(const LayoutObject&, PaintInvalidatorContext&); |
| + void InvalidatePaint(FrameView&, |
| + const PaintPropertyTreeBuilderContext*, |
| + PaintInvalidatorContext&); |
| + void InvalidatePaint(const LayoutObject&, |
| + const PaintPropertyTreeBuilderContext*, |
| + PaintInvalidatorContext&); |
| // Process objects needing paint invalidation on the next frame. |
| // See the definition of PaintInvalidationDelayedFull for more details. |
| @@ -140,8 +156,10 @@ class PaintInvalidator { |
| PaintInvalidatorContext&); |
| ALWAYS_INLINE void UpdatePaintInvalidationContainer(const LayoutObject&, |
| PaintInvalidatorContext&); |
| - ALWAYS_INLINE void UpdateVisualRectIfNeeded(const LayoutObject&, |
| - PaintInvalidatorContext&); |
| + ALWAYS_INLINE void UpdateVisualRectIfNeeded( |
| + const LayoutObject&, |
| + const PaintPropertyTreeBuilderContext*, |
| + PaintInvalidatorContext&); |
| ALWAYS_INLINE void UpdateVisualRect(const LayoutObject&, |
| PaintInvalidatorContext&); |