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(
context.paint_invalidation_container_for_stacked_contents =
ToLayoutBoxModelObject(&object);
} 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
// context for stacked contents in sub-frames.
// 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;
context.paint_invalidation_container =
&object.ContainerForPaintInvalidation();
} else if (object.IsColumnSpanAll() ||
object.IsFloatingWithNonContainingBlockParent()) {
// In these cases, the object may belong to an ancestor of the current
......@@ -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(
const LayoutObject& object,
PaintInvalidatorContext& context) {
......
......@@ -138,9 +138,6 @@ struct CORE_EXPORT PaintInvalidatorContext {
class PaintInvalidator {
public:
void InvalidatePaint(LocalFrameView&,
const PaintPropertyTreeBuilderContext*,
PaintInvalidatorContext&);
// Returns true if the object is invalidated.
bool InvalidatePaint(const LayoutObject&,
const PaintPropertyTreeBuilderContext*,
......
......@@ -115,11 +115,6 @@ void PrePaintTreeWalk::Walk(LocalFrameView& frame_view) {
if (context().tree_builder_context) {
PaintPropertyTreeBuilder::SetupContextForFrame(
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 =
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