#include "third_party/blink/renderer/core/layout/layout_shift_region.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
namespace blink {
namespace {
struct Segment { … };
enum class EventType { … };
struct SweepEvent { … };
class BasicIntervals { … };
#if DCHECK_IS_ON()
#define DCHECK_HAS_INDEX …
#else
#define DCHECK_HAS_INDEX …
#endif
inline void BasicIntervals::AddEndpoint(int endpoint) { … }
void BasicIntervals::CreateIndex() { … }
inline unsigned BasicIntervals::NumIntervals() const { … }
inline Segment BasicIntervals::SegmentFromEndpoints(int start, int end) const { … }
inline unsigned BasicIntervals::SegmentLength(Segment segment) const { … }
#undef DCHECK_HAS_INDEX
class SegmentTree { … };
SegmentTree::SegmentTree(const BasicIntervals& intervals)
: … { … }
inline void SegmentTree::RefSegment(Segment segment) { … }
inline void SegmentTree::DerefSegment(Segment segment) { … }
inline unsigned SegmentTree::ActiveLength() const { … }
unsigned SegmentTree::ComputeCapacity(unsigned leaf_count) { … }
inline unsigned SegmentTree::LeftChild(unsigned node_index) { … }
inline unsigned SegmentTree::RightChild(unsigned node_index) { … }
inline Segment SegmentTree::RootSegment() const { … }
inline unsigned SegmentTree::ComputeActiveLength(unsigned node_index,
Segment node_segment) const { … }
void SegmentTree::Visit(unsigned node_index,
Segment node_segment,
Segment query_segment,
int refcount_delta) { … }
class Sweeper { … };
Sweeper::Sweeper(const Vector<gfx::Rect>& rects) : … { … }
uint64_t Sweeper::Sweep() const { … }
void Sweeper::InitIntervals(BasicIntervals& y_vals) const { … }
void Sweeper::InitEventQueue(Vector<SweepEvent>& events,
const BasicIntervals& y_vals) const { … }
uint64_t Sweeper::SweepImpl(SegmentTree& tree,
const Vector<SweepEvent>& events) const { … }
}
uint64_t LayoutShiftRegion::Area() const { … }
}