Lines Matching defs:key
52 * 1) A scratch key. This is for resources whose allocations are cached but not their contents.
53 * Multiple resources can share the same scratch key. This is so a caller can have two
55 * between two temporary surfaces). The scratch key is set at resource creation time and
56 * should never change. Resources need not have a scratch key.
57 * 2) A unique key. This key's meaning is specific to the domain that created the key. Only one
58 * resource may have a given unique key. The unique key can be set, cleared, or changed
61 * A unique key always takes precedence over a scratch key when a resource has both types of keys.
62 * If a resource has neither key type then it will be deleted as soon as the last reference to it
162 * Find a resource that matches a scratch key.
174 * Find a resource that matches a unique key.
176 GrGpuResource* findAndRefUniqueResource(const GrUniqueKey& key) {
177 GrGpuResource* resource = fUniqueHash.find(key);
187 * Query whether a unique key exists in the cache.
189 bool hasUniqueKey(const GrUniqueKey& key) const {
190 return SkToBool(fUniqueHash.find(key));
457 static uint32_t Hash(const GrScratchKey& key) { return key.hash(); }
465 static uint32_t Hash(const GrUniqueKey& key) { return key.hash(); }
636 * Called by a GrGpuResource to remove its unique key.
641 * Called by a GrGpuResource when it removes its scratch key.