8#ifndef GrResourceProvider_DEFINED
9#define GrResourceProvider_DEFINED
68 template <
typename T = GrGpuResource>
71 return sk_sp<T>(
static_cast<T*
>(this->findResourceByUniqueKey(
key).release()));
87 int renderTargetSampleCnt,
89 std::string_view label);
96 int renderTargetSampleCnt,
100 std::string_view label);
112 int renderTargetSampleCnt,
117 std::string_view label);
129 int renderTargetSampleCnt,
134 std::string_view label);
145 int renderTargetSampleCnt,
148 std::string_view label);
160 std::string_view label);
238 const void* staticData,
259 if (
auto buffer = this->findByUniqueKey<const GrGpuBuffer>(
key)) {
262 return this->createPatternedIndexBuffer(pattern, patternSize, reps, vertCount, &
key);
273 if (!fNonAAQuadIndexBuffer) {
274 fNonAAQuadIndexBuffer = this->createNonAAQuadIndexBuffer();
276 return fNonAAQuadIndexBuffer;
291 if (!fAAQuadIndexBuffer) {
292 fAAQuadIndexBuffer = this->createAAQuadIndexBuffer();
294 return fAAQuadIndexBuffer;
351 [[nodiscard]] std::unique_ptr<GrSemaphore>
makeSemaphore(
bool isOwned =
true);
380 int renderTargetSampleCnt,
384 std::string_view label);
393 std::string_view label);
405 TempLevelDatas*)
const;
416 int mipLevelCount)
const;
425 const GrGpu*
gpu()
const {
return fGpu; }
427 bool isAbandoned()
const {
@ kBorrow_GrWrapOwnership
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static constexpr bool SkToBool(const T &x)
uint32_t contextUniqueID() const
bool attachStencilAttachment(GrRenderTarget *rt, bool useMSAASurface)
static int NumIndicesPerNonAAQuad()
sk_sp< GrRenderTarget > wrapBackendRenderTarget(const GrBackendRenderTarget &)
static int MaxNumNonAAQuads()
uint32_t contextUniqueID() const
sk_sp< const GrGpuBuffer > findOrCreatePatternedIndexBuffer(const uint16_t *pattern, int patternSize, int reps, int vertCount, const skgpu::UniqueKey &key)
sk_sp< GrAttachment > getDiscardableMSAAAttachment(SkISize dimensions, const GrBackendFormat &format, int sampleCnt, skgpu::Protected isProtected, GrMemoryless memoryless)
GrResourceProvider(GrGpu *, GrResourceCache *, skgpu::SingleOwner *)
std::enable_if< std::is_base_of< GrGpuResource, T >::value, sk_sp< T > >::type findByUniqueKey(const skgpu::UniqueKey &key)
sk_sp< GrTexture > createApproxTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Protected isProtected, std::string_view label)
void assignUniqueKeyToResource(const skgpu::UniqueKey &, GrGpuResource *)
std::unique_ptr< GrSemaphore > makeSemaphore(bool isOwned=true)
void(*)(skgpu::VertexWriter, size_t bufferSize) InitializeBufferFn
static int MaxNumAAQuads()
std::unique_ptr< GrSemaphore > wrapBackendSemaphore(const GrBackendSemaphore &, GrSemaphoreWrapType, GrWrapOwnership=kBorrow_GrWrapOwnership)
sk_sp< GrTexture > wrapBackendTexture(const GrBackendTexture &tex, GrWrapOwnership, GrWrapCacheable, GrIOType)
static int NumIndicesPerAAQuad()
sk_sp< GrGpuBuffer > createBuffer(size_t size, GrGpuBufferType, GrAccessPattern, ZeroInit)
sk_sp< GrTexture > findAndRefScratchTexture(const skgpu::ScratchKey &, std::string_view label)
static int NumVertsPerAAQuad()
static int NumVertsPerNonAAQuad()
GrResourceProviderPriv priv()
sk_sp< const GrGpuBuffer > refNonAAQuadIndexBuffer()
sk_sp< const GrGpuBuffer > refAAQuadIndexBuffer()
sk_sp< GrTexture > createTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped mipmapped, skgpu::Budgeted budgeted, skgpu::Protected isProtected, std::string_view label)
sk_sp< const GrGpuBuffer > findOrMakeStaticBuffer(GrGpuBufferType intendedType, size_t size, const skgpu::UniqueKey &key, InitializeBufferFn)
sk_sp< GrRenderTarget > wrapVulkanSecondaryCBAsRenderTarget(const SkImageInfo &, const GrVkDrawableInfo &)
sk_sp< GrTexture > createCompressedTexture(SkISize dimensions, const GrBackendFormat &, skgpu::Budgeted, skgpu::Mipmapped, skgpu::Protected, SkData *data, std::string_view label)
sk_sp< GrAttachment > makeMSAAAttachment(SkISize dimensions, const GrBackendFormat &format, int sampleCnt, skgpu::Protected isProtected, GrMemoryless isMemoryless)
sk_sp< GrTexture > wrapCompressedBackendTexture(const GrBackendTexture &tex, GrWrapOwnership, GrWrapCacheable)
sk_sp< GrTexture > wrapRenderableBackendTexture(const GrBackendTexture &tex, int sampleCnt, GrWrapOwnership, GrWrapCacheable)
const GrCaps * caps() const
uint32_t uint32_t * format
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
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
std::shared_ptr< const fml::Mapping > data