5#ifndef FLUTTER_DISPLAY_LIST_GEOMETRY_DL_RTREE_H_
6#define FLUTTER_DISPLAY_LIST_GEOMETRY_DL_RTREE_H_
14#include "third_party/skia/include/core/SkRefCnt.h"
29 static constexpr int kMaxChildren = 11;
65 const int ids[] =
nullptr,
66 bool predicate(
int id) = [](
int) {
return true; },
79 void search(
const DlRect& query, std::vector<int>* results)
const;
83 int id(
int result_index)
const {
84 return (result_index >= 0 && result_index < leaf_count_)
85 ? nodes_[result_index].id
96 return (result_index >= 0 && result_index < leaf_count_)
97 ? nodes_[result_index].bounds
103 return sizeof(
DlRTree) +
sizeof(Node) * nodes_.size();
125 bool deband =
true)
const;
141 void search(
const Node& parent,
143 std::vector<int>* results)
const;
145 std::vector<Node> nodes_;
148 mutable std::optional<DlRegion> region_;
const DlRect & bounds(int result_index) const
int id(int result_index) const
DlRegion region(const DlRect &query) const
const DlRegion & region() const
size_t bytes_used() const
Returns the bytes used by the object and all of its node data.
void search(const DlRect &query, std::vector< int > *results) const
std::list< DlRect > searchAndConsolidateRects(const DlRect &query, bool deband=true) const
const DlRect & bounds() const
static DlRegion MakeIntersection(const DlRegion &a, const DlRegion &b)
RoundOut(const TRect< U > &r)