![]() |
Flutter Engine
The Flutter Engine
|
#include <GrProxyProvider.h>
Classes | |
struct | TextureInfo |
Public Types | |
enum class | InvalidateGPUResource : bool { kNo = false , kYes = true } |
using | UseAllocator = GrSurfaceProxy::UseAllocator |
typedef void * | ReleaseContext |
typedef void(* | ReleaseProc) (ReleaseContext) |
using | LazyInstantiationKeyMode = GrSurfaceProxy::LazyInstantiationKeyMode |
using | LazySurfaceDesc = GrSurfaceProxy::LazySurfaceDesc |
using | LazyCallbackResult = GrSurfaceProxy::LazyCallbackResult |
using | LazyInstantiateCallback = GrSurfaceProxy::LazyInstantiateCallback |
Static Public Member Functions | |
static sk_sp< GrTextureProxy > | CreatePromiseProxy (GrContextThreadSafeProxy *, LazyInstantiateCallback &&, const GrBackendFormat &, SkISize dimensions, skgpu::Mipmapped) |
static sk_sp< GrTextureProxy > | MakeFullyLazyProxy (LazyInstantiateCallback &&, const GrBackendFormat &, GrRenderable, int renderTargetSampleCnt, GrProtected, const GrCaps &, UseAllocator) |
Friends | |
class | GrAHardwareBufferImageGenerator |
class | GrResourceProvider |
Definition at line 28 of file GrProxyProvider.h.
Definition at line 147 of file GrProxyProvider.h.
Definition at line 148 of file GrProxyProvider.h.
Definition at line 145 of file GrProxyProvider.h.
Definition at line 146 of file GrProxyProvider.h.
typedef void* GrProxyProvider::ReleaseContext |
Definition at line 112 of file GrProxyProvider.h.
typedef void(* GrProxyProvider::ReleaseProc) (ReleaseContext) |
Definition at line 113 of file GrProxyProvider.h.
Definition at line 30 of file GrProxyProvider.h.
|
strong |
Enumerator | |
---|---|
kNo | |
kYes |
Definition at line 213 of file GrProxyProvider.h.
GrProxyProvider::GrProxyProvider | ( | GrImageContext * | imageContext | ) |
Definition at line 38 of file GrProxyProvider.cpp.
GrProxyProvider::~GrProxyProvider | ( | ) |
Definition at line 40 of file GrProxyProvider.cpp.
void GrProxyProvider::adoptUniqueKeyFromSurface | ( | GrTextureProxy * | proxy, |
const GrSurface * | surf | ||
) |
Definition at line 80 of file GrProxyProvider.cpp.
bool GrProxyProvider::assignUniqueKeyToProxy | ( | const skgpu::UniqueKey & | key, |
GrTextureProxy * | proxy | ||
) |
Definition at line 49 of file GrProxyProvider.cpp.
const GrCaps * GrProxyProvider::caps | ( | ) | const |
Definition at line 998 of file GrProxyProvider.cpp.
uint32_t GrProxyProvider::contextID | ( | ) | const |
Definition at line 994 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::createCompressedTextureProxy | ( | SkISize | dimensions, |
skgpu::Budgeted | budgeted, | ||
skgpu::Mipmapped | mipmapped, | ||
GrProtected | isProtected, | ||
SkTextureCompressionType | compressionType, | ||
sk_sp< SkData > | data | ||
) |
Definition at line 532 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::createLazyProxy | ( | LazyInstantiateCallback && | callback, |
const GrBackendFormat & | format, | ||
SkISize | dimensions, | ||
skgpu::Mipmapped | mipmapped, | ||
GrMipmapStatus | mipmapStatus, | ||
GrInternalSurfaceFlags | surfaceFlags, | ||
SkBackingFit | fit, | ||
skgpu::Budgeted | budgeted, | ||
GrProtected | isProtected, | ||
GrSurfaceProxy::UseAllocator | useAllocator, | ||
std::string_view | label | ||
) |
Creates a texture proxy that will be instantiated by a user-supplied callback during flush. The width and height must either both be greater than 0 or both less than or equal to zero. A non-positive value is a signal that the width height are currently unknown. The texture will not be renderable.
When called, the callback must be able to cleanup any resources that it captured at creation. It also must support being passed in a null GrResourceProvider. When this happens, the callback should cleanup any resources it captured and return an empty sk_sp<GrTextureProxy>.
Definition at line 790 of file GrProxyProvider.cpp.
sk_sp< GrRenderTargetProxy > GrProxyProvider::createLazyRenderTargetProxy | ( | LazyInstantiateCallback && | callback, |
const GrBackendFormat & | format, | ||
SkISize | dimensions, | ||
int | renderTargetSampleCnt, | ||
GrInternalSurfaceFlags | surfaceFlags, | ||
const TextureInfo * | textureInfo, | ||
GrMipmapStatus | mipmapStatus, | ||
SkBackingFit | fit, | ||
skgpu::Budgeted | budgeted, | ||
GrProtected | isProtected, | ||
bool | wrapsVkSecondaryCB, | ||
UseAllocator | useAllocator | ||
) |
A null TextureInfo indicates a non-textureable render target.
Definition at line 831 of file GrProxyProvider.cpp.
|
static |
Similar to createLazyProxy below, except narrowed to the use case of shared promise images i.e. static so it doesn't have access to mutable state. Used by MakePromiseImageLazyProxy().
Definition at line 748 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::createProxy | ( | const GrBackendFormat & | format, |
SkISize | dimensions, | ||
GrRenderable | renderable, | ||
int | renderTargetSampleCnt, | ||
skgpu::Mipmapped | mipmapped, | ||
SkBackingFit | fit, | ||
skgpu::Budgeted | budgeted, | ||
GrProtected | isProtected, | ||
std::string_view | label, | ||
GrInternalSurfaceFlags | surfaceFlags = GrInternalSurfaceFlags::kNone , |
||
GrSurfaceProxy::UseAllocator | useAllocator = UseAllocator::kYes |
||
) |
Definition at line 456 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::createProxyFromBitmap | ( | const SkBitmap & | bitmap, |
skgpu::Mipmapped | mipmapped, | ||
SkBackingFit | fit, | ||
skgpu::Budgeted | budgeted | ||
) |
Definition at line 271 of file GrProxyProvider.cpp.
GrSurfaceProxyView GrProxyProvider::findCachedProxyWithColorTypeFallback | ( | const skgpu::UniqueKey & | key, |
GrSurfaceOrigin | origin, | ||
GrColorType | ct, | ||
int | sampleCnt | ||
) |
A helper that uses findOrCreateProxyByUniqueKey() to find a proxy and, if found, creates a view for the found proxy using the passed in origin and color type. It is assumed that if the proxy is renderable then it was created via a fallback code path so the fallback color type will be used to create the view.
Definition at line 250 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::findOrCreateProxyByUniqueKey | ( | const skgpu::UniqueKey & | key, |
UseAllocator | useAllocator = UseAllocator::kYes |
||
) |
Definition at line 215 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::findProxyByUniqueKey | ( | const skgpu::UniqueKey & | key | ) |
Definition at line 101 of file GrProxyProvider.cpp.
bool GrProxyProvider::isAbandoned | ( | ) | const |
Definition at line 1006 of file GrProxyProvider.cpp.
GrDDLProvider GrProxyProvider::isDDLProvider | ( | ) | const |
Definition at line 990 of file GrProxyProvider.cpp.
|
static |
Fully lazy proxies have unspecified width and height. Methods that rely on those values (e.g., width, height, getBoundsRect) should be avoided.
Definition at line 895 of file GrProxyProvider.cpp.
int GrProxyProvider::numUniqueKeyProxies_TestOnly | ( | ) | const |
Definition at line 50 of file TextureProxyTest.cpp.
void GrProxyProvider::orphanAllUniqueKeys | ( | ) |
Definition at line 1010 of file GrProxyProvider.cpp.
void GrProxyProvider::processInvalidUniqueKey | ( | const skgpu::UniqueKey & | key, |
GrTextureProxy * | proxy, | ||
InvalidateGPUResource | invalidateGPUResource | ||
) |
Definition at line 947 of file GrProxyProvider.cpp.
Definition at line 1002 of file GrProxyProvider.cpp.
void GrProxyProvider::removeAllUniqueKeys | ( | ) |
Definition at line 1016 of file GrProxyProvider.cpp.
void GrProxyProvider::removeUniqueKeyFromProxy | ( | GrTextureProxy * | proxy | ) |
Definition at line 89 of file GrProxyProvider.cpp.
bool GrProxyProvider::renderingDirectly | ( | ) | const |
Does the proxy provider have access to a GrDirectContext? If so, proxies will be instantiated immediately.
Definition at line 1028 of file GrProxyProvider.cpp.
GrResourceProvider * GrProxyProvider::resourceProvider | ( | ) | const |
Definition at line 706 of file GrProxyProvider.cpp.
sk_sp< GrSurfaceProxy > GrProxyProvider::wrapBackendRenderTarget | ( | const GrBackendRenderTarget & | backendRT, |
sk_sp< skgpu::RefCntedCallback > | releaseHelper | ||
) |
Definition at line 715 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::wrapBackendTexture | ( | const GrBackendTexture & | backendTex, |
GrWrapOwnership | ownership, | ||
GrWrapCacheable | cacheable, | ||
GrIOType | ioType, | ||
sk_sp< skgpu::RefCntedCallback > | releaseHelper = nullptr |
||
) |
Definition at line 592 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::wrapCompressedBackendTexture | ( | const GrBackendTexture & | beTex, |
GrWrapOwnership | ownership, | ||
GrWrapCacheable | cacheable, | ||
sk_sp< skgpu::RefCntedCallback > | releaseHelper | ||
) |
Definition at line 630 of file GrProxyProvider.cpp.
sk_sp< GrTextureProxy > GrProxyProvider::wrapRenderableBackendTexture | ( | const GrBackendTexture & | backendTex, |
int | sampleCnt, | ||
GrWrapOwnership | ownership, | ||
GrWrapCacheable | cacheable, | ||
sk_sp< skgpu::RefCntedCallback > | releaseHelper | ||
) |
Definition at line 665 of file GrProxyProvider.cpp.
|
friend |
Definition at line 280 of file GrProxyProvider.h.
|
friend |
Definition at line 281 of file GrProxyProvider.h.