diff --git a/display_list/display_list.cc b/display_list/display_list.cc index 27511e0a5d619..e343ed365e604 100644 --- a/display_list/display_list.cc +++ b/display_list/display_list.cc @@ -59,13 +59,16 @@ uint32_t DisplayList::next_unique_id() { class Culler { public: + virtual ~Culler() = default; virtual bool init(DispatchContext& context) = 0; virtual void update(DispatchContext& context) = 0; }; -class NopCuller : public Culler { +class NopCuller final : public Culler { public: static NopCuller instance; + ~NopCuller() = default; + bool init(DispatchContext& context) override { // Setting next_render_index to 0 means that // all rendering ops will be at or after that @@ -78,11 +81,13 @@ class NopCuller : public Culler { void update(DispatchContext& context) override {} }; NopCuller NopCuller::instance = NopCuller(); -class VectorCuller : public Culler { +class VectorCuller final : public Culler { public: VectorCuller(const DlRTree* rtree, const std::vector& rect_indices) : rtree_(rtree), cur_(rect_indices.begin()), end_(rect_indices.end()) {} + ~VectorCuller() = default; + bool init(DispatchContext& context) override { if (cur_ < end_) { context.next_render_index = rtree_->id(*cur_++);