Flutter Engine
The Flutter Engine
|
#include <GrGpuResourcePriv.h>
Public Member Functions | |
void | setUniqueKey (const skgpu::UniqueKey &key) |
void | removeUniqueKey () |
void | makeBudgeted () |
void | makeUnbudgeted () |
GrBudgetedType | budgetedType () const |
bool | refsWrappedObjects () const |
const skgpu::ScratchKey & | getScratchKey () const |
void | removeScratchKey () const |
bool | isPurgeable () const |
bool | hasRefOrCommandBufferUsage () const |
Protected Member Functions | |
ResourcePriv (GrGpuResource *resource) | |
ResourcePriv (const ResourcePriv &that) | |
ResourcePriv & | operator= (const CacheAccess &)=delete |
const ResourcePriv * | operator& () const |
ResourcePriv * | operator& () |
Protected Attributes | |
GrGpuResource * | fResource |
Friends | |
class | GrGpuResource |
This class allows code internal to Skia privileged access to manage the cache keys and budget status of a GrGpuResource object.
Definition at line 17 of file GrGpuResourcePriv.h.
|
inlineprotected |
Definition at line 78 of file GrGpuResourcePriv.h.
|
inlineprotected |
Definition at line 79 of file GrGpuResourcePriv.h.
|
inline |
Get the resource's budgeted-type which indicates whether it counts against the resource cache budget and if not whether it is allowed to be cached.
Definition at line 47 of file GrGpuResourcePriv.h.
|
inline |
If this resource can be used as a scratch resource this returns a valid scratch key. Otherwise it returns a key for which isNullScratch is true. The resource may currently be used as a uniquely keyed resource rather than scratch. Check isScratch().
Definition at line 63 of file GrGpuResourcePriv.h.
|
inline |
Definition at line 73 of file GrGpuResourcePriv.h.
|
inline |
Definition at line 71 of file GrGpuResourcePriv.h.
|
inline |
If the resource is uncached make it cached. Has no effect on resources that are wrapped or already cached.
Definition at line 35 of file GrGpuResourcePriv.h.
|
inline |
If the resource is cached make it uncached. Has no effect on resources that are wrapped or already uncached. Furthermore, resources with unique keys cannot be made unbudgeted.
Definition at line 41 of file GrGpuResourcePriv.h.
|
protected |
|
protected |
|
protecteddelete |
|
inline |
Is the resource object wrapping an externally allocated GPU resource?
Definition at line 56 of file GrGpuResourcePriv.h.
|
inline |
If the resource has a scratch key, the key will be removed. Since scratch keys are installed at resource creation time, this means the resource will never again be used as scratch.
Definition at line 69 of file GrGpuResourcePriv.h.
|
inline |
Removes the unique key from a resource. If the resource has a scratch key, it may be preserved for recycling as scratch.
Definition at line 29 of file GrGpuResourcePriv.h.
|
inline |
Sets a unique key for the resource. If the resource was previously cached as scratch it will be converted to a uniquely-keyed resource. If the key is invalid then this is equivalent to removeUniqueKey(). If another resource is using the key then its unique key is removed and this resource takes over the key.
Definition at line 25 of file GrGpuResourcePriv.h.
|
friend |
Definition at line 88 of file GrGpuResourcePriv.h.
|
protected |
Definition at line 86 of file GrGpuResourcePriv.h.