8#ifndef skgpu_graphite_ResourceProvider_DEFINED
9#define skgpu_graphite_ResourceProvider_DEFINED
37class ComputePipelineDesc;
39class GraphicsPipeline;
40class GraphicsPipelineDesc;
41class GraphiteResourceKey;
43class RuntimeEffectDictionary;
44class ShaderCodeDictionary;
64 std::string_view label,
78 std::string_view label);
99#if defined(GRAPHITE_TEST_UTILS)
104#ifdef SK_BUILD_FOR_ANDROID
107 bool isProtectedContent,
109 bool fromAndroidWindow)
const;
114 SingleOwner* singleOwner,
116 size_t resourceBudget);
137 std::string_view label,
143#ifdef SK_BUILD_FOR_ANDROID
146 bool isProtectedContent,
148 bool fromAndroidWindow)
const;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
struct AHardwareBuffer AHardwareBuffer
sk_sp< GraphicsPipeline > findOrCreateGraphicsPipeline(const RuntimeEffectDictionary *, const GraphicsPipelineDesc &, const RenderPassDesc &)
sk_sp< Texture > findOrCreateDiscardableMSAAAttachment(SkISize dimensions, const TextureInfo &)
sk_sp< ComputePipeline > findOrCreateComputePipeline(const ComputePipelineDesc &)
virtual sk_sp< Sampler > createSampler(const SamplerDesc &)=0
void purgeResourcesNotUsedSince(StdSteadyClock::time_point purgeTime)
ProxyCache * proxyCache()
virtual sk_sp< Buffer > createBuffer(size_t size, BufferType type, AccessPattern)=0
sk_sp< Texture > createWrappedTexture(const BackendTexture &, std::string_view label)
virtual sk_sp< Texture > onCreateWrappedTexture(const BackendTexture &)=0
sk_sp< Texture > findOrCreateScratchTexture(SkISize, const TextureInfo &, std::string_view label, skgpu::Budgeted)
virtual BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo &)=0
ResourceProvider(SharedContext *sharedContext, SingleOwner *singleOwner, uint32_t recorderID, size_t resourceBudget)
sk_sp< Sampler > findOrCreateCompatibleSampler(const SamplerDesc &)
BackendTexture createBackendTexture(SkISize dimensions, const TextureInfo &)
sk_sp< Texture > findOrCreateDepthStencilAttachment(SkISize dimensions, const TextureInfo &)
void deleteBackendTexture(const BackendTexture &)
virtual sk_sp< GraphicsPipeline > createGraphicsPipeline(const RuntimeEffectDictionary *, const GraphicsPipelineDesc &, const RenderPassDesc &)=0
virtual void onDeleteBackendTexture(const BackendTexture &)=0
virtual sk_sp< Texture > createTexture(SkISize, const TextureInfo &, skgpu::Budgeted)=0
virtual ~ResourceProvider()
size_t getResourceCacheLimit() const
sk_sp< Buffer > findOrCreateBuffer(size_t size, BufferType type, AccessPattern, std::string_view label)
sk_sp< ResourceCache > fResourceCache
size_t getResourceCacheCurrentBudgetedBytes() const
void dumpMemoryStatistics(SkTraceMemoryDump *traceMemoryDump) const
SharedContext * fSharedContext
virtual sk_sp< ComputePipeline > createComputePipeline(const ComputePipelineDesc &)=0
std::function< ProfileSample(void)> Sampler
Sampler is run during SamplingProfiler::SampleRepeatedly. Each platform should implement its version ...
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