Flutter Engine
The Flutter Engine
|
#include <Resource.h>
Classes | |
class | UniqueID |
Public Member Functions | |
Resource (const Resource &)=delete | |
Resource (Resource &&)=delete | |
Resource & | operator= (const Resource &)=delete |
Resource & | operator= (Resource &&)=delete |
void | ref () const |
void | unref () const |
void | refCommandBuffer () const |
void | unrefCommandBuffer () const |
Ownership | ownership () const |
skgpu::Budgeted | budgeted () const |
size_t | gpuMemorySize () const |
UniqueID | uniqueID () const |
virtual const char * | getResourceType () const =0 |
std::string | getLabel () const |
void | setLabel (std::string_view label) |
bool | wasDestroyed () const |
const GraphiteResourceKey & | key () const |
void | setKey (const GraphiteResourceKey &key) |
void | dumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump) const |
virtual void | prepareForReturnToCache (const std::function< void()> &takeRef) |
Protected Member Functions | |
Resource (const SharedContext *, Ownership, skgpu::Budgeted, size_t gpuMemorySize, std::string_view label, bool commandBufferRefsAsUsageRefs=false) | |
virtual | ~Resource () |
const SharedContext * | sharedContext () const |
virtual void | freeGpuData ()=0 |
virtual void | invokeReleaseProc () |
virtual void | onDumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump, const char *dumpName) const |
void | setDeleteASAP () |
Friends | |
class | ProxyCache |
Base class for objects that can be kept in the ResourceCache.
Definition at line 37 of file Resource.h.
|
delete |
|
delete |
|
protected |
Definition at line 26 of file Resource.cpp.
|
protectedvirtual |
Definition at line 48 of file Resource.cpp.
|
inline |
Definition at line 100 of file Resource.h.
void skgpu::graphite::Resource::dumpMemoryStatistics | ( | SkTraceMemoryDump * | traceMemoryDump | ) | const |
Definition at line 98 of file Resource.cpp.
|
protectedpure virtual |
Implemented in skgpu::graphite::DawnBuffer, skgpu::graphite::DawnComputePipeline, skgpu::graphite::DawnGraphicsPipeline, skgpu::graphite::DawnSampler, skgpu::graphite::DawnTexture, skgpu::graphite::MtlBlitCommandEncoder, skgpu::graphite::MtlBuffer, skgpu::graphite::MtlComputeCommandEncoder, skgpu::graphite::MtlComputePipeline, skgpu::graphite::MtlGraphicsPipeline, skgpu::graphite::MtlRenderCommandEncoder, skgpu::graphite::MtlSampler, skgpu::graphite::MtlTexture, skgpu::graphite::VulkanBuffer, skgpu::graphite::VulkanDescriptorSet, skgpu::graphite::VulkanFramebuffer, skgpu::graphite::VulkanGraphicsPipeline, skgpu::graphite::VulkanRenderPass, skgpu::graphite::VulkanSampler, skgpu::graphite::VulkanSamplerYcbcrConversion, skgpu::graphite::VulkanTexture, and skgpu::graphite::TestResource.
|
inline |
Definition at line 132 of file Resource.h.
|
pure virtual |
Implemented in skgpu::graphite::Buffer, skgpu::graphite::ComputePipeline, skgpu::graphite::GraphicsPipeline, skgpu::graphite::MtlBlitCommandEncoder, skgpu::graphite::MtlComputeCommandEncoder, skgpu::graphite::MtlRenderCommandEncoder, skgpu::graphite::Sampler, skgpu::graphite::Texture, skgpu::graphite::VulkanDescriptorSet, skgpu::graphite::VulkanFramebuffer, skgpu::graphite::VulkanRenderPass, skgpu::graphite::VulkanSamplerYcbcrConversion, and skgpu::graphite::TestResource.
|
inline |
Definition at line 104 of file Resource.h.
|
inlineprotectedvirtual |
|
inline |
Definition at line 153 of file Resource.h.
|
inlineprotectedvirtual |
Reimplemented in skgpu::graphite::DawnBuffer, skgpu::graphite::DawnTexture, and skgpu::graphite::Texture.
Definition at line 196 of file Resource.h.
|
inline |
Definition at line 98 of file Resource.h.
|
inlinevirtual |
If the resource has a non-shareable key then this gives the resource subclass an opportunity to prepare itself to re-enter the cache. The ResourceCache extends its privilege to take the first UsageRef to this function via takeRef. If takeRef is called this resource will not immediately enter the cache but will be re-reprocessed with the Usage Ref count again reaches zero.
Definition at line 170 of file Resource.h.
|
inline |
Definition at line 45 of file Resource.h.
|
inline |
Definition at line 70 of file Resource.h.
|
inlineprotected |
Definition at line 205 of file Resource.h.
|
inline |
Definition at line 155 of file Resource.h.
|
inline |
Definition at line 136 of file Resource.h.
|
inlineprotected |
Definition at line 187 of file Resource.h.
|
inline |
Definition at line 123 of file Resource.h.
|
inline |
Definition at line 53 of file Resource.h.
|
inline |
Definition at line 79 of file Resource.h.
|
inline |
Definition at line 151 of file Resource.h.
|
friend |
Definition at line 208 of file Resource.h.