#include <raster_cache_key.h>
Definition at line 23 of file raster_cache_key.h.
◆ RasterCacheKeyID() [1/2]
flutter::RasterCacheKeyID::RasterCacheKeyID |
( |
uint64_t |
unique_id, |
|
|
RasterCacheKeyType |
type |
|
) |
| |
|
inline |
Definition at line 27 of file raster_cache_key.h.
RasterCacheKeyType type() const
uint64_t unique_id() const
◆ RasterCacheKeyID() [2/2]
Definition at line 30 of file raster_cache_key.h.
static constexpr uint64_t kDefaultUniqueID
const std::vector< RasterCacheKeyID > & child_ids() const
◆ child_ids()
const std::vector< RasterCacheKeyID > & flutter::RasterCacheKeyID::child_ids |
( |
| ) |
const |
|
inline |
◆ GetHash()
std::size_t flutter::RasterCacheKeyID::GetHash |
( |
| ) |
const |
|
inline |
Definition at line 45 of file raster_cache_key.h.
45 {
46 if (cached_hash_) {
47 return cached_hash_.value();
48 }
52 for (auto& child_id : child_ids_) {
54 }
55 cached_hash_ = seed;
56 return seed;
57 }
constexpr std::size_t HashCombine()
constexpr void HashCombineSeed(std::size_t &seed, Type arg)
◆ LayerChildrenIds()
std::optional< std::vector< RasterCacheKeyID > > flutter::RasterCacheKeyID::LayerChildrenIds |
( |
const Layer * |
layer | ) |
|
|
static |
Definition at line 14 of file raster_cache_key.cc.
15 {
17 auto& children_layers = layer->as_container_layer()->layers();
18 auto children_count = children_layers.size();
19 if (children_count == 0) {
20 return std::nullopt;
21 }
22 std::vector<RasterCacheKeyID> ids;
23 std::transform(
24 children_layers.begin(), children_layers.end(), std::back_inserter(ids),
25 [](auto& layer) -> RasterCacheKeyID { return layer->caching_key_id(); });
26 return ids;
27}
#define FML_DCHECK(condition)
◆ operator!=()
bool flutter::RasterCacheKeyID::operator!= |
( |
const RasterCacheKeyID & |
other | ) |
const |
|
inline |
Definition at line 64 of file raster_cache_key.h.
64 {
66 }
bool operator==(const RasterCacheKeyID &other) const
◆ operator==()
bool flutter::RasterCacheKeyID::operator== |
( |
const RasterCacheKeyID & |
other | ) |
const |
|
inline |
Definition at line 59 of file raster_cache_key.h.
59 {
60 return unique_id_ == other.unique_id_ && type_ == other.type_ &&
61 GetHash() == other.GetHash() && child_ids_ == other.child_ids_;
62 }
std::size_t GetHash() const
◆ type()
◆ unique_id()
uint64_t flutter::RasterCacheKeyID::unique_id |
( |
| ) |
const |
|
inline |
◆ kDefaultUniqueID
constexpr uint64_t flutter::RasterCacheKeyID::kDefaultUniqueID = 0 |
|
staticconstexpr |
The documentation for this class was generated from the following files: