#include <raster_cache_key.h>
Definition at line 25 of file raster_cache_key.h.
◆ RasterCacheKeyID() [1/2]
flutter::RasterCacheKeyID::RasterCacheKeyID |
( |
uint64_t |
unique_id, |
|
|
RasterCacheKeyType |
type |
|
) |
| |
|
inline |
Definition at line 29 of file raster_cache_key.h.
RasterCacheKeyType type() const
uint64_t unique_id() const
◆ RasterCacheKeyID() [2/2]
Definition at line 32 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 47 of file raster_cache_key.h.
47 {
48 if (cached_hash_) {
49 return cached_hash_.value();
50 }
54 for (auto& child_id : child_ids_) {
56 }
57 cached_hash_ = seed;
58 return seed;
59 }
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 15 of file raster_cache_key.cc.
16 {
18 auto& children_layers = layer->as_container_layer()->layers();
19 auto children_count = children_layers.size();
20 if (children_count == 0) {
21 return std::nullopt;
22 }
23 std::vector<RasterCacheKeyID> ids;
25 children_layers.begin(), children_layers.end(), std::back_inserter(ids),
27 return ids;
28}
RasterCacheKeyID(uint64_t unique_id, RasterCacheKeyType type)
#define FML_DCHECK(condition)
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
◆ operator!=()
bool flutter::RasterCacheKeyID::operator!= |
( |
const RasterCacheKeyID & |
other | ) |
const |
|
inline |
Definition at line 66 of file raster_cache_key.h.
66 {
68 }
bool operator==(const RasterCacheKeyID &other) const
◆ operator==()
bool flutter::RasterCacheKeyID::operator== |
( |
const RasterCacheKeyID & |
other | ) |
const |
|
inline |
Definition at line 61 of file raster_cache_key.h.
61 {
62 return unique_id_ == other.unique_id_ && type_ == other.type_ &&
63 GetHash() == other.GetHash() && child_ids_ == other.child_ids_;
64 }
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: