#include "third_party/blink/renderer/core/paint/cull_rect_updater.h"
#include "base/auto_reset.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/pagination_state.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/paint/fragment_data_iterator.h"
#include "third_party/blink/renderer/core/paint/object_paint_properties.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/paint_layer_paint_order_iterator.h"
#include "third_party/blink/renderer/core/paint/paint_layer_painter.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/paint/paint_property_tree_builder.h"
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
namespace blink {
namespace {
float ExpansionRatio(const LayoutObject& object) { … }
FragmentCullRects;
Vector<FragmentCullRects>* g_original_cull_rects = …;
void SetLayerNeedsRepaintOnCullRectChange(PaintLayer& layer) { … }
void SetFragmentCullRect(PaintLayer& layer,
FragmentData& fragment,
const CullRect& cull_rect) { … }
bool SetFragmentContentsCullRect(PaintLayer& layer,
FragmentData& fragment,
const CullRect& contents_cull_rect) { … }
bool ShouldUseInfiniteCullRect(
const PaintLayer& layer,
ViewTransitionSupplement* view_transition_supplement,
bool& subtree_should_use_infinite_cull_rect) { … }
bool HasScrolledEnough(const LayoutObject& object) { … }
}
CullRectUpdater::CullRectUpdater(PaintLayer& starting_layer,
bool disable_expansion)
: … { … }
void CullRectUpdater::Update() { … }
void CullRectUpdater::UpdateForTesting(const CullRect& input_cull_rect) { … }
void CullRectUpdater::UpdateInternal(const CullRect& input_cull_rect) { … }
void CullRectUpdater::UpdateRecursively(const Context& parent_context,
PaintLayer& layer) { … }
void CullRectUpdater::UpdateForDescendants(const Context& context,
PaintLayer& layer) { … }
bool CullRectUpdater::UpdateForSelf(Context& context, PaintLayer& layer) { … }
CullRect CullRectUpdater::ComputeFragmentCullRect(
Context& context,
PaintLayer& layer,
const FragmentData& fragment,
const FragmentData& parent_fragment) { … }
CullRect CullRectUpdater::ComputeFragmentContentsCullRect(
Context& context,
PaintLayer& layer,
const FragmentData& fragment,
const CullRect& cull_rect) { … }
bool CullRectUpdater::ShouldProactivelyUpdate(const Context& context,
const PaintLayer& layer) const { … }
void CullRectUpdater::PaintPropertiesChanged(
const LayoutObject& object,
const PaintPropertiesChangeInfo& properties_changed) { … }
bool CullRectUpdater::IsOverridingCullRects() { … }
FragmentCullRects::FragmentCullRects(FragmentData& fragment)
: … { … }
OverriddenCullRectScope::OverriddenCullRectScope(PaintLayer& starting_layer,
const CullRect& cull_rect,
bool disable_expansion) { … }
OverriddenCullRectScope::~OverriddenCullRectScope() { … }
}