Commit c93df492 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[CI] Remove PaintInvalidator::InvalidatePaint(LocalFrameView&)

It just initializes the context, which does almost the same thing
as when the LayoutView is walked.

Change-Id: I8a4b0560bdb1da79361db8c16948f0d67aa236ce
Reviewed-on: https://chromium-review.googlesource.com/c/1394929Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619794}
parent ec95f419
...@@ -248,13 +248,14 @@ void PaintInvalidator::UpdatePaintInvalidationContainer( ...@@ -248,13 +248,14 @@ void PaintInvalidator::UpdatePaintInvalidationContainer(
context.paint_invalidation_container_for_stacked_contents = context.paint_invalidation_container_for_stacked_contents =
ToLayoutBoxModelObject(&object); ToLayoutBoxModelObject(&object);
} else if (object.IsLayoutView()) { } else if (object.IsLayoutView()) {
// paintInvalidationContainerForStackedContents is only for stacked // paint_invalidation_container_for_stacked_contents is only for stacked
// descendants in its own frame, because it doesn't establish stacking // descendants in its own frame, because it doesn't establish stacking
// context for stacked contents in sub-frames. // context for stacked contents in sub-frames.
// Contents stacked in the root stacking context in this frame should use // Contents stacked in the root stacking context in this frame should use
// this frame's paintInvalidationContainer. // this frame's PaintInvalidationContainer.
context.paint_invalidation_container_for_stacked_contents = context.paint_invalidation_container_for_stacked_contents =
context.paint_invalidation_container; context.paint_invalidation_container =
&object.ContainerForPaintInvalidation();
} else if (object.IsColumnSpanAll() || } else if (object.IsColumnSpanAll() ||
object.IsFloatingWithNonContainingBlockParent()) { object.IsFloatingWithNonContainingBlockParent()) {
// In these cases, the object may belong to an ancestor of the current // In these cases, the object may belong to an ancestor of the current
...@@ -367,28 +368,6 @@ void PaintInvalidator::UpdateVisualRect(const LayoutObject& object, ...@@ -367,28 +368,6 @@ void PaintInvalidator::UpdateVisualRect(const LayoutObject& object,
} }
} }
void PaintInvalidator::InvalidatePaint(
LocalFrameView& frame_view,
const PaintPropertyTreeBuilderContext* tree_builder_context,
PaintInvalidatorContext& context) {
LayoutView* layout_view = frame_view.GetLayoutView();
CHECK(layout_view);
context.paint_invalidation_container =
context.paint_invalidation_container_for_stacked_contents =
&layout_view->ContainerForPaintInvalidation();
context.painting_layer = layout_view->Layer();
context.fragment_data = &layout_view->FirstFragment();
if (tree_builder_context) {
context.tree_builder_context_ = &tree_builder_context->fragments[0];
#if DCHECK_IS_ON()
context.tree_builder_context_actually_needed_ =
tree_builder_context->is_actually_needed;
#endif
}
}
void PaintInvalidator::UpdateEmptyVisualRectFlag( void PaintInvalidator::UpdateEmptyVisualRectFlag(
const LayoutObject& object, const LayoutObject& object,
PaintInvalidatorContext& context) { PaintInvalidatorContext& context) {
......
...@@ -138,9 +138,6 @@ struct CORE_EXPORT PaintInvalidatorContext { ...@@ -138,9 +138,6 @@ struct CORE_EXPORT PaintInvalidatorContext {
class PaintInvalidator { class PaintInvalidator {
public: public:
void InvalidatePaint(LocalFrameView&,
const PaintPropertyTreeBuilderContext*,
PaintInvalidatorContext&);
// Returns true if the object is invalidated. // Returns true if the object is invalidated.
bool InvalidatePaint(const LayoutObject&, bool InvalidatePaint(const LayoutObject&,
const PaintPropertyTreeBuilderContext*, const PaintPropertyTreeBuilderContext*,
......
...@@ -115,11 +115,6 @@ void PrePaintTreeWalk::Walk(LocalFrameView& frame_view) { ...@@ -115,11 +115,6 @@ void PrePaintTreeWalk::Walk(LocalFrameView& frame_view) {
if (context().tree_builder_context) { if (context().tree_builder_context) {
PaintPropertyTreeBuilder::SetupContextForFrame( PaintPropertyTreeBuilder::SetupContextForFrame(
frame_view, *context().tree_builder_context); frame_view, *context().tree_builder_context);
}
paint_invalidator_.InvalidatePaint(
frame_view, base::OptionalOrNullptr(context().tree_builder_context),
context().paint_invalidator_context);
if (context().tree_builder_context) {
context().tree_builder_context->supports_composited_raster_invalidation = context().tree_builder_context->supports_composited_raster_invalidation =
frame_view.GetFrame().GetSettings()->GetAcceleratedCompositingEnabled(); frame_view.GetFrame().GetSettings()->GetAcceleratedCompositingEnabled();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment