8#ifndef MemoryCache_DEFINED
9#define MemoryCache_DEFINED
15#include <unordered_map>
46 template <
typename Fn>
47 void foreach(Fn&& fn) {
48 for (
auto it = fMap.begin(); it != fMap.end(); ++it) {
49 fn(it->first.fKey, it->second.fData, it->second.fDescription, it->second.fHitCount);
57 Key(
const Key& that) =
default;
60 return that.fKey->
size() == fKey->size() &&
61 !memcmp(fKey->data(), that.fKey->
data(), that.fKey->
size());
70 , fDescription(description)
81 using argument_type =
Key;
82 using result_type = uint32_t;
83 uint32_t operator()(
const Key&
key)
const {
88 int fCacheMissCnt = 0;
89 int fCacheStoreCnt = 0;
90 std::unordered_map<Key, Value, Hash> fMap;
void writeShadersToDisk(const char *path, GrBackendApi backend)
void store(const SkData &key, const SkData &data, const SkString &description) override
int numCacheMisses() const
sk_sp< SkData > load(const SkData &key) override
MemoryCache & operator=(const MemoryCache &)=delete
int numCacheStores() const
MemoryCache(const MemoryCache &)=delete
uint32_t Hash32(const void *data, size_t bytes, uint32_t seed)
static uint32_t Hash(uint32_t key)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
bool operator==(C p1, const scoped_nsprotocol< C > &p2)
std::shared_ptr< const fml::Mapping > data