8#ifndef GrSurfaceProxy_DEFINED
9#define GrSurfaceProxy_DEFINED
105 bool releaseCallback =
true,
191 return fID == other.fID;
194 return !(*
this == other);
315 if (kInvalidGpuMemorySize == fGpuMemorySize) {
316 fGpuMemorySize = this->onUninstantiatedGpuMemorySize();
317 SkASSERT(kInvalidGpuMemorySize != fGpuMemorySize);
319 return fGpuMemorySize;
322 std::string_view
getLabel()
const {
return fLabel; }
347 std::string_view label,
358 std::string_view label,
361#if defined(GR_TEST_UTILS)
362 int32_t testingOnly_getBackingRefCnt()
const;
394 std::string_view label);
404 std::string_view label);
477 static const size_t kInvalidGpuMemorySize = ~
static_cast<size_t>(0);
478 SkDEBUGCODE(
size_t getRawGpuMemorySize_debugOnly()
const {
return fGpuMemorySize; })
480 virtual size_t onUninstantiatedGpuMemorySize()
const = 0;
484 bool fIgnoredByResourceAllocator =
false;
485 bool fIsDDLTarget =
false;
486 bool fIsPromiseProxy =
false;
489 int fTaskTargetCount = 0;
491 const std::string fLabel;
497 mutable std::atomic<size_t> fGpuMemorySize{kInvalidGpuMemorySize};
@ kRequiresManualMSAAResolve
#define GR_MAKE_BITFIELD_CLASS_OPS(X)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static constexpr bool SkToBool(const T &x)
static constexpr uint32_t SK_InvalidUniqueID
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
UniqueID uniqueID() const
UniqueID(const GrGpuResource::UniqueID &id)
bool operator==(const UniqueID &other) const
bool operator!=(const UniqueID &other) const
static UniqueID InvalidID()
void setIgnoredByResourceAllocator()
SkISize backingStoreDimensions() const
UniqueID underlyingUniqueID() const
virtual const skgpu::UniqueKey & getUniqueKey() const
int getTaskTargetCount() const
GrProtected isProtected() const
virtual GrRenderTargetProxy * asRenderTargetProxy()
SkRect backingStoreBoundsRect() const
const GrBackendFormat & backendFormat() const
virtual ~GrSurfaceProxy()
bool instantiateImpl(GrResourceProvider *resourceProvider, int sampleCnt, GrRenderable, skgpu::Mipmapped, const skgpu::UniqueKey *)
virtual bool instantiate(GrResourceProvider *)=0
bool requiresManualMSAAResolve() const
bool framebufferOnly() const
size_t gpuMemorySize() const
GrSurfaceProxyPriv priv()
std::string_view getLabel() const
bool isFormatCompressed(const GrCaps *) const
GrTexture * peekTexture() const
SkRect getBoundsRect() const
skgpu::Budgeted isBudgeted() const
static sk_sp< GrSurfaceProxy > Copy(GrRecordingContext *, sk_sp< GrSurfaceProxy > src, GrSurfaceOrigin, skgpu::Mipmapped, SkIRect srcRect, SkBackingFit, skgpu::Budgeted, std::string_view label, RectsMustMatch=RectsMustMatch::kNo, sk_sp< GrRenderTask > *outTask=nullptr)
SkDEBUGCODE(size_t getRawGpuMemorySize_debugOnly() const { return fGpuMemorySize;}) virtual size_t onUninstantiatedGpuMemorySize() const =0
virtual LazySurfaceDesc callbackDesc() const =0
SkISize dimensions() const
GrSurfaceProxy(const GrBackendFormat &, SkISize, SkBackingFit, skgpu::Budgeted, GrProtected, GrInternalSurfaceFlags, UseAllocator, std::string_view label)
void computeScratchKey(const GrCaps &, skgpu::ScratchKey *) const
std::function< LazyCallbackResult(GrResourceProvider *, const LazySurfaceDesc &)> LazyInstantiateCallback
virtual GrTextureProxy * asTextureProxy()
GrSurface * peekSurface() const
bool canSkipResourceAllocator() const
virtual const GrRenderTargetProxy * asRenderTargetProxy() const
virtual sk_sp< GrSurface > createSurface(GrResourceProvider *) const =0
bool ignoredByResourceAllocator() const
bool isInstantiated() const
virtual const GrTextureProxy * asTextureProxy() const
bool isFunctionallyExact() const
void setLazyDimensions(SkISize dimensions)
void assign(sk_sp< GrSurface > surface)
SkIRect backingStoreBoundsIRect() const
sk_sp< GrSurface > createSurfaceImpl(GrResourceProvider *, int sampleCnt, GrRenderable, skgpu::Mipmapped) const
sk_sp< GrSurface > fTarget
void isUsedAsTaskTarget()
GrInternalSurfaceFlags fSurfaceFlags
SkDEBUGCODE(void validateSurface(const GrSurface *);) SkDEBUGCODE(virtual void onValidateSurface(const GrSurface *)=0
UniqueID uniqueID() const
GrRenderTarget * peekRenderTarget() const
virtual GrTexture * asTexture()
virtual GrRenderTarget * asRenderTarget()
Dart_NativeFunction function
DEF_SWITCHES_START aot vmservice shared library name
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 mode
LazyCallbackResult & operator=(LazyCallbackResult &&)=default
LazyInstantiationKeyMode fKeyMode
sk_sp< GrSurface > fSurface
LazyCallbackResult(LazyCallbackResult &&that)=default
LazyCallbackResult()=default
LazyCallbackResult & operator=(const LazyCallbackResult &)=default
LazyCallbackResult(const LazyCallbackResult &)=default
skgpu::Mipmapped fMipmapped
skgpu::Budgeted fBudgeted
GrTextureType fTextureType
const GrBackendFormat & fFormat
static constexpr SkIRect MakeSize(const SkISize &size)
constexpr int32_t width() const
constexpr int32_t height() const
static SkRect Make(const SkISize &size)