5#include "flutter/shell/platform/fuchsia/flutter/rtree.h"
9#include "flutter/display_list/geometry/dl_region.h"
10#include "flutter/fml/logging.h"
22 bbh_->
insert(boundsArray, metadata,
N);
23 for (
int i = 0;
i <
N;
i++) {
24 if (metadata !=
nullptr && metadata[
i].isDraw) {
25 draw_op_[
i] = boundsArray[
i];
32 insert(boundsArray,
nullptr,
N);
36 bbh_->
search(query, results);
40 const SkRect& query)
const {
42 std::vector<int> intermediary_results;
43 search(query, &intermediary_results);
45 std::vector<SkIRect> rects;
46 for (
int index : intermediary_results) {
47 auto draw_op = draw_op_.find(index);
49 if (draw_op == draw_op_.end()) {
53 draw_op->second.roundOut(¤t_record_rect);
54 rects.push_back(current_record_rect);
58 auto non_overlapping_rects =
region.getRects(
true);
59 std::list<SkRect> final_results;
60 for (
const auto&
rect : non_overlapping_rects) {
71 r_tree_ = sk_make_sp<RTree>();
virtual size_t bytesUsed() const =0
virtual void search(const SkRect &query, std::vector< int > *results) const =0
virtual void insert(const SkRect[], int N)=0
sk_sp< RTree > getInstance()
sk_sp< SkBBoxHierarchy > operator()() const override
std::list< SkRect > searchNonOverlappingDrawnRects(const SkRect &query) const
size_t bytesUsed() const override
void insert(const SkRect[], const SkBBoxHierarchy::Metadata[], int N) override
void search(const SkRect &query, std::vector< int > *results) const override
#define FML_DCHECK(condition)
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
static SkRect Make(const SkISize &size)