Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 00ce1fd

Browse files
authored
add virtual destructor to new virtual Culler class (#38494)
1 parent 6bee6d7 commit 00ce1fd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

display_list/display_list.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,16 @@ uint32_t DisplayList::next_unique_id() {
5959

6060
class Culler {
6161
public:
62+
virtual ~Culler() = default;
6263
virtual bool init(DispatchContext& context) = 0;
6364
virtual void update(DispatchContext& context) = 0;
6465
};
65-
class NopCuller : public Culler {
66+
class NopCuller final : public Culler {
6667
public:
6768
static NopCuller instance;
6869

70+
~NopCuller() = default;
71+
6972
bool init(DispatchContext& context) override {
7073
// Setting next_render_index to 0 means that
7174
// all rendering ops will be at or after that
@@ -78,11 +81,13 @@ class NopCuller : public Culler {
7881
void update(DispatchContext& context) override {}
7982
};
8083
NopCuller NopCuller::instance = NopCuller();
81-
class VectorCuller : public Culler {
84+
class VectorCuller final : public Culler {
8285
public:
8386
VectorCuller(const DlRTree* rtree, const std::vector<int>& rect_indices)
8487
: rtree_(rtree), cur_(rect_indices.begin()), end_(rect_indices.end()) {}
8588

89+
~VectorCuller() = default;
90+
8691
bool init(DispatchContext& context) override {
8792
if (cur_ < end_) {
8893
context.next_render_index = rtree_->id(*cur_++);

0 commit comments

Comments
 (0)