/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/private/SkIDChangeListener.h" #include "include/private/base/SkAssert.h" #include <utility> /** * Used to be notified when a gen/unique ID is invalidated, typically to preemptively purge * associated items from a cache that are no longer reachable. The listener can * be marked for deregistration if the cached item is remove before the listener is * triggered. This prevents unbounded listener growth when cache items are routinely * removed before the gen ID/unique ID is invalidated. */ SkIDChangeListener::SkIDChangeListener() : … { … } SkIDChangeListener::~SkIDChangeListener() = default; List; List::List() = default; List::~List() { … } void List::add(sk_sp<SkIDChangeListener> listener) { … } int List::count() const { … } void List::changed() { … } void List::reset() { … }