Commit 001d06dc authored by Xianzhu Wang's avatar Xianzhu Wang

[CI] Remove LocalFrameView::needs_paint_property_update_

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I78a16b329a01bf3bafee0a12f33422390bbe2930
Reviewed-on: https://chromium-review.googlesource.com/1095422Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566533}
parent fda462d4
......@@ -226,7 +226,6 @@ LocalFrameView::LocalFrameView(LocalFrame& frame, IntRect frame_rect)
hidden_for_throttling_(false),
subtree_throttled_(false),
lifecycle_updates_throttled_(false),
needs_paint_property_update_(true),
current_update_lifecycle_phases_target_state_(
DocumentLifecycle::kUninitialized),
past_layout_lifecycle_update_(false),
......@@ -1295,17 +1294,11 @@ void LocalFrameView::UpdateLayout() {
}
void LocalFrameView::SetNeedsPaintPropertyUpdate() {
needs_paint_property_update_ = true;
if (auto* layout_view = this->GetLayoutView()) {
if (auto* layout_view = GetLayoutView())
layout_view->SetNeedsPaintPropertyUpdate();
return;
}
if (LayoutObject* owner = GetFrame().OwnerLayoutObject())
owner->SetNeedsPaintPropertyUpdate();
}
void LocalFrameView::SetSubtreeNeedsPaintPropertyUpdate() {
SetNeedsPaintPropertyUpdate();
if (auto* layout_view = GetLayoutView())
layout_view->SetSubtreeNeedsPaintPropertyUpdate();
}
......
......@@ -751,30 +751,8 @@ class CORE_EXPORT LocalFrameView final
void BeginLifecycleUpdates();
// TODO(pdr): Remove the paint property update bits from LocalFrameView in
// favor of using LayoutView.
// Paint properties (e.g., m_preTranslation, etc.) are built from the
// LocalFrameView's state (e.g., x(), y(), etc.) as well as inherited context.
// When these inputs change, setNeedsPaintPropertyUpdate will cause a paint
// property tree update during the next document lifecycle update.
// setNeedsPaintPropertyUpdate also sets the owning layout tree as needing a
// paint property update.
// Shorthands of LayoutView's corresponding methods.
void SetNeedsPaintPropertyUpdate();
#if DCHECK_IS_ON()
// Similar to setNeedsPaintPropertyUpdate() but does not set the owning layout
// tree as needing a paint property update.
void SetOnlyThisNeedsPaintPropertyUpdateForTesting() {
needs_paint_property_update_ = true;
}
#endif
void ClearNeedsPaintPropertyUpdate() {
DCHECK_EQ(Lifecycle().GetState(), DocumentLifecycle::kInPrePaint);
needs_paint_property_update_ = false;
}
bool NeedsPaintPropertyUpdate() const { return needs_paint_property_update_; }
// Set when the whole frame subtree needs full paint property update,
// e.g. when beginning or finishing printing.
void SetSubtreeNeedsPaintPropertyUpdate();
// Viewport size that should be used for viewport units (i.e. 'vh'/'vw').
......@@ -1183,10 +1161,6 @@ class CORE_EXPORT LocalFrameView final
bool subtree_throttled_;
bool lifecycle_updates_throttled_;
// Whether the paint properties need to be updated. For more details, see
// LocalFrameView::needsPaintPropertyUpdate().
bool needs_paint_property_update_;
// This is set on the local root frame view only.
DocumentLifecycle::LifecycleState
current_update_lifecycle_phases_target_state_;
......
......@@ -93,7 +93,7 @@ void PrePaintTreeWalk::Walk(LocalFrameView& frame_view) {
return context_storage_.back();
};
// ancestorOverflowLayer does not cross frame boundaries.
// ancestor_overflow_paint_layer does not cross frame boundaries.
context().ancestor_overflow_paint_layer = nullptr;
if (context().tree_builder_context) {
PaintPropertyTreeBuilder::SetupContextForFrame(
......@@ -122,9 +122,9 @@ void PrePaintTreeWalk::Walk(LocalFrameView& frame_view) {
#endif
}
frame_view.ClearNeedsPaintPropertyUpdate();
if (RuntimeEnabledFeatures::JankTrackingEnabled())
frame_view.GetJankTracker().NotifyPrePaintFinished();
context_storage_.pop_back();
}
......@@ -241,9 +241,8 @@ void PrePaintTreeWalk::InvalidatePaintLayerOptimizationsIfNeeded(
bool PrePaintTreeWalk::NeedsTreeBuilderContextUpdate(
const LocalFrameView& frame_view,
const PrePaintTreeWalkContext& context) {
return frame_view.NeedsPaintPropertyUpdate() ||
(frame_view.GetLayoutView() &&
NeedsTreeBuilderContextUpdate(*frame_view.GetLayoutView(), context));
return frame_view.GetLayoutView() &&
NeedsTreeBuilderContextUpdate(*frame_view.GetLayoutView(), context);
}
bool PrePaintTreeWalk::NeedsTreeBuilderContextUpdate(
......
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