5
5
#include < type_traits>
6
6
7
7
#include " flutter/display_list/display_list.h"
8
+ #include " flutter/display_list/display_list_builder.h"
8
9
#include " flutter/display_list/display_list_canvas_dispatcher.h"
9
10
#include " flutter/display_list/display_list_ops.h"
10
- #include " flutter/display_list/display_list_utils.h"
11
11
#include " flutter/fml/trace_event.h"
12
12
13
13
namespace flutter {
@@ -23,24 +23,24 @@ DisplayList::DisplayList()
23
23
nested_op_count_(0 ),
24
24
unique_id_(0 ),
25
25
bounds_({0 , 0 , 0 , 0 }),
26
- bounds_cull_({0 , 0 , 0 , 0 }),
27
26
can_apply_group_opacity_(true ) {}
28
27
29
28
DisplayList::DisplayList (uint8_t * ptr,
30
29
size_t byte_count,
31
30
unsigned int op_count,
32
31
size_t nested_byte_count,
33
32
unsigned int nested_op_count,
34
- const SkRect& cull_rect,
35
- bool can_apply_group_opacity)
33
+ const SkRect& bounds,
34
+ bool can_apply_group_opacity,
35
+ sk_sp<const DlRTree> rtree)
36
36
: storage_(ptr),
37
37
byte_count_(byte_count),
38
38
op_count_(op_count),
39
39
nested_byte_count_(nested_byte_count),
40
40
nested_op_count_(nested_op_count),
41
- bounds_({ 0 , 0 , - 1 , - 1 } ),
42
- bounds_cull_(cull_rect ),
43
- can_apply_group_opacity_(can_apply_group_opacity ) {
41
+ bounds_(bounds ),
42
+ can_apply_group_opacity_(can_apply_group_opacity ),
43
+ rtree_(std::move(rtree) ) {
44
44
static std::atomic<uint32_t > next_id{1 };
45
45
do {
46
46
unique_id_ = next_id.fetch_add (+1 , std::memory_order_relaxed);
@@ -52,26 +52,6 @@ DisplayList::~DisplayList() {
52
52
DisposeOps (ptr, ptr + byte_count_);
53
53
}
54
54
55
- void DisplayList::ComputeBounds () {
56
- RectBoundsAccumulator accumulator;
57
- DisplayListBoundsCalculator calculator (accumulator, &bounds_cull_);
58
- Dispatch (calculator);
59
- if (calculator.is_unbounded ()) {
60
- FML_LOG (INFO) << " returning partial bounds for unbounded DisplayList" ;
61
- }
62
- bounds_ = accumulator.bounds ();
63
- }
64
-
65
- void DisplayList::ComputeRTree () {
66
- RTreeBoundsAccumulator accumulator;
67
- DisplayListBoundsCalculator calculator (accumulator, &bounds_cull_);
68
- Dispatch (calculator);
69
- if (calculator.is_unbounded ()) {
70
- FML_LOG (INFO) << " returning partial rtree for unbounded DisplayList" ;
71
- }
72
- rtree_ = accumulator.rtree ();
73
- }
74
-
75
55
void DisplayList::Dispatch (Dispatcher& dispatcher,
76
56
uint8_t * ptr,
77
57
uint8_t * end) const {
0 commit comments