40 std::string_view label)
42 format, dimensions, fit, budgeted, isProtected, surfaceFlags, useAllocator, label)
43 , fMipmapped(mipmapped)
44 , fMipmapStatus(mipmapStatus)
SkDEBUGCODE(, fInitialMipmapStatus(fMipmapStatus))
45 , fCreatingProvider(creatingProvider)
46 , fProxyProvider(nullptr)
47 , fDeferredUploader(nullptr) {
66 std::string_view label)
76 , fMipmapped(mipmapped)
77 , fMipmapStatus(mipmapStatus)
SkDEBUGCODE(, fInitialMipmapStatus(fMipmapStatus))
78 , fCreatingProvider(creatingProvider)
79 , fProxyProvider(nullptr)
80 , fDeferredUploader(nullptr) {
92 , fMipmapped(fTarget->asTexture()->mipmapped())
93 , fMipmapStatus(fTarget->asTexture()->mipmapStatus())
95 , fCreatingProvider(creatingProvider)
96 , fProxyProvider(nullptr)
97 , fDeferredUploader(nullptr) {
115 if (fUniqueKey.
isValid() && fProxyProvider) {
128 fUniqueKey.
isValid() ? &fUniqueKey :
nullptr)) {
150 SkASSERT(!fTextureProxy->fDeferredUploader);
151 fTextureProxy->fDeferredUploader = std::move(uploader);
156 if (fTextureProxy->fDeferredUploader && fTextureProxy->
isInstantiated()) {
157 fTextureProxy->fDeferredUploader->scheduleUpload(flushState, fTextureProxy);
162 SkASSERT(fTextureProxy->fDeferredUploader);
163 fTextureProxy->fDeferredUploader.reset();
175size_t GrTextureProxy::onUninstantiatedGpuMemorySize()
const {
178 !this->
priv().isExact());
193 if (
fTarget && fSyncTargetKey) {
201 fProxyProvider = proxyProvider;
204void GrTextureProxy::clearUniqueKey() {
206 fProxyProvider =
nullptr;
static constexpr int kGrInternalTextureFlagsMask
#define INHERITED(method,...)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
GrDirectContextPriv priv()
void setUniqueKey(const skgpu::UniqueKey &key)
const GrDirectContext * getContext() const
const skgpu::UniqueKey & getUniqueKey() const
ResourcePriv resourcePriv()
GrResourceProvider * resourceProvider() const final
void processInvalidUniqueKey(const skgpu::UniqueKey &, GrTextureProxy *, InvalidateGPUResource)
void adoptUniqueKeyFromSurface(GrTextureProxy *proxy, const GrSurface *)
GrProxyProvider * proxyProvider()
GrProtected isProtected() const
const GrBackendFormat & backendFormat() const
bool instantiateImpl(GrResourceProvider *resourceProvider, int sampleCnt, GrRenderable, skgpu::Mipmapped, const skgpu::UniqueKey *)
GrSurfaceProxyPriv priv()
std::string_view getLabel() const
GrTexture * peekTexture() const
skgpu::Budgeted isBudgeted() const
SkISize dimensions() const
std::function< LazyCallbackResult(GrResourceProvider *, const LazySurfaceDesc &)> LazyInstantiateCallback
bool isInstantiated() const
bool isFunctionallyExact() const
sk_sp< GrSurface > createSurfaceImpl(GrResourceProvider *, int sampleCnt, GrRenderable, skgpu::Mipmapped) const
sk_sp< GrSurface > fTarget
GrInternalSurfaceFlags fSurfaceFlags
GrRenderTarget * peekRenderTarget() const
static size_t ComputeSize(const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
virtual GrTexture * asTexture()
void setDeferredUploader(std::unique_ptr< GrDeferredProxyUploader >)
void scheduleUpload(GrOpFlushState *)
void resetDeferredUploader()
GrTextureType textureType() const
static bool ProxiesAreCompatibleAsDynamicState(const GrSurfaceProxy *first, const GrSurfaceProxy *second)
skgpu::Mipmapped proxyMipmapped() const
GrTextureProxy(const GrBackendFormat &, SkISize, skgpu::Mipmapped, GrMipmapStatus, SkBackingFit, skgpu::Budgeted, skgpu::Protected, GrInternalSurfaceFlags, UseAllocator, GrDDLProvider creatingProvider, std::string_view label)
sk_sp< GrSurface > createSurface(GrResourceProvider *) const override
~GrTextureProxy() override
skgpu::Mipmapped mipmapped() const
bool instantiate(GrResourceProvider *) override
skgpu::Mipmapped mipmapped() const
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
uint32_t uint32_t * format