Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrMockTextureRenderTarget Class Reference

#include <GrMockTexture.h>

Inheritance diagram for GrMockTextureRenderTarget:
GrMockTexture GrMockRenderTarget GrTexture GrRenderTarget GrSurface GrSurface GrGpuResource GrGpuResource GrIORef< GrGpuResource > GrIORef< GrGpuResource > SkNoncopyable SkNoncopyable

Public Member Functions

 GrMockTextureRenderTarget (GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, int sampleCnt, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &texInfo, const GrMockRenderTargetInfo &rtInfo, std::string_view label)
 
 GrMockTextureRenderTarget (GrMockGpu *gpu, SkISize dimensions, int sampleCnt, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &texInfo, const GrMockRenderTargetInfo &rtInfo, GrWrapCacheable cacheable, std::string_view label)
 
GrTextureasTexture () override
 
GrRenderTargetasRenderTarget () override
 
const GrTextureasTexture () const override
 
const GrRenderTargetasRenderTarget () const override
 
GrBackendFormat backendFormat () const override
 
- Public Member Functions inherited from GrMockTexture
 GrMockTexture (GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, std::string_view label)
 
 GrMockTexture (GrMockGpu *gpu, SkISize dimensions, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, GrWrapCacheable cacheable, GrIOType ioType, std::string_view label)
 
 ~GrMockTexture () override
 
GrBackendTexture getBackendTexture () const override
 
GrBackendFormat backendFormat () const override
 
void textureParamsModified () override
 
- Public Member Functions inherited from GrTexture
GrTextureasTexture () override
 
const GrTextureasTexture () const override
 
virtual GrBackendTexture getBackendTexture () const =0
 
virtual void textureParamsModified ()=0
 
GrTextureType textureType () const
 
bool hasRestrictedSampling () const
 
void markMipmapsDirty ()
 
void markMipmapsClean ()
 
skgpu::Mipmapped mipmapped () const
 
bool mipmapsAreDirty () const
 
GrMipmapStatus mipmapStatus () const
 
int maxMipmapLevel () const
 
- Public Member Functions inherited from GrSurface
SkISize dimensions () const
 
int width () const
 
int height () const
 
SkRect getBoundsRect () const
 
virtual GrBackendFormat backendFormat () const =0
 
void setRelease (sk_sp< skgpu::RefCntedCallback > releaseHelper)
 
void setRelease (ReleaseProc proc, ReleaseCtx ctx)
 
virtual GrTextureasTexture ()
 
virtual const GrTextureasTexture () const
 
virtual GrRenderTargetasRenderTarget ()
 
virtual const GrRenderTargetasRenderTarget () const
 
GrInternalSurfaceFlags flags () const
 
bool readOnly () const
 
bool framebufferOnly () const
 
bool isProtected () const
 
void setFramebufferOnly ()
 
- Public Member Functions inherited from GrGpuResource
bool wasDestroyed () const
 
const GrDirectContextgetContext () const
 
GrDirectContextgetContext ()
 
size_t gpuMemorySize () const
 
UniqueID uniqueID () const
 
const skgpu::UniqueKeygetUniqueKey () const
 
std::string getLabel () const
 
void setLabel (std::string_view label)
 
CacheAccess cacheAccess ()
 
const CacheAccess cacheAccess () const
 
ProxyAccess proxyAccess ()
 
ResourcePriv resourcePriv ()
 
const ResourcePriv resourcePriv () const
 
virtual void dumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump) const
 
virtual const char * getResourceType () const =0
 
- Public Member Functions inherited from GrIORef< GrGpuResource >
bool unique () const
 
void ref () const
 
void unref () const
 
void refCommandBuffer () const
 
void unrefCommandBuffer () const
 
- Public Member Functions inherited from SkNoncopyable
 SkNoncopyable ()=default
 
 SkNoncopyable (SkNoncopyable &&)=default
 
SkNoncopyableoperator= (SkNoncopyable &&)=default
 
- Public Member Functions inherited from GrMockRenderTarget
 GrMockRenderTarget (GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
 
 GrMockRenderTarget (GrMockGpu *gpu, Wrapped, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
 
bool canAttemptStencilAttachment (bool useMSAASurface) const override
 
bool completeStencilAttachment (GrAttachment *, bool useMSAASurface) override
 
size_t onGpuMemorySize () const override
 
GrBackendRenderTarget getBackendRenderTarget () const override
 
GrBackendFormat backendFormat () const override
 
- Public Member Functions inherited from GrRenderTarget
virtual bool alwaysClearStencil () const
 
GrRenderTargetasRenderTarget () override
 
const GrRenderTargetasRenderTarget () const override
 
int numSamples () const
 
virtual GrBackendRenderTarget getBackendRenderTarget () const =0
 
GrAttachmentgetStencilAttachment (bool useMSAASurface) const
 
GrAttachmentgetStencilAttachment () const
 
virtual bool canAttemptStencilAttachment (bool useMSAASurface) const =0
 
void attachStencilAttachment (sk_sp< GrAttachment > stencil, bool useMSAASurface)
 
int numStencilBits (bool useMSAASurface) const
 
int getSamplePatternKey ()
 
const skia_private::TArray< SkPoint > & getSampleLocations ()
 
void setRequiresManualMSAAResolve ()
 
bool requiresManualMSAAResolve () const
 

Additional Inherited Members

- Public Types inherited from GrSurface
typedef void * ReleaseCtx
 
typedef void(* ReleaseProc) (ReleaseCtx)
 
- Public Types inherited from GrIORef< GrGpuResource >
enum  LastRemovedRef
 
- Public Types inherited from GrMockRenderTarget
enum  Wrapped { kWrapped }
 
- Static Public Member Functions inherited from GrTexture
static bool StealBackendTexture (sk_sp< GrTexture >, GrBackendTexture *, SkImages::BackendTextureReleaseProc *)
 
static void ComputeScratchKey (const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, GrRenderable, int sampleCnt, skgpu::Mipmapped, GrProtected, skgpu::ScratchKey *key)
 
- Static Public Member Functions inherited from GrSurface
static size_t ComputeSize (const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
 
- Static Public Member Functions inherited from GrGpuResource
static uint32_t CreateUniqueID ()
 
- Protected Member Functions inherited from GrMockTexture
 GrMockTexture (GrMockGpu *gpu, const SkISize &dims, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, std::string_view label)
 
void onRelease () override
 
void onAbandon () override
 
bool onStealBackendTexture (GrBackendTexture *, SkImages::BackendTextureReleaseProc *) override
 
- Protected Member Functions inherited from GrTexture
 GrTexture (GrGpu *, const SkISize &, GrProtected, GrTextureType, GrMipmapStatus, std::string_view label)
 
virtual bool onStealBackendTexture (GrBackendTexture *, SkImages::BackendTextureReleaseProc *)=0
 
void computeScratchKey (skgpu::ScratchKey *) const override
 
- Protected Member Functions inherited from GrSurface
void setGLRTFBOIDIs0 ()
 
bool glRTFBOIDis0 () const
 
void setRequiresManualMSAAResolve ()
 
bool requiresManualMSAAResolve () const
 
void setReadOnly ()
 
void setVkRTSupportsInputAttachment ()
 
 GrSurface (GrGpu *gpu, const SkISize &dimensions, skgpu::Protected isProtected, std::string_view label)
 
 ~GrSurface () override
 
void onRelease () override
 
void onAbandon () override
 
- Protected Member Functions inherited from GrGpuResource
void registerWithCache (skgpu::Budgeted)
 
void registerWithCacheWrapped (GrWrapCacheable)
 
 GrGpuResource (GrGpu *, std::string_view label)
 
virtual ~GrGpuResource ()
 
GrGpugetGpu () const
 
virtual void onRelease ()
 
virtual void onAbandon ()
 
virtual void setMemoryBacking (SkTraceMemoryDump *, const SkString &) const
 
SkString getResourceName () const
 
void dumpMemoryStatisticsPriv (SkTraceMemoryDump *traceMemoryDump, const SkString &resourceName, const char *type, size_t size) const
 
- Protected Member Functions inherited from GrIORef< GrGpuResource >
 GrIORef ()
 
bool internalHasRef () const
 
bool internalHasNoCommandBufferUsages () const
 
void addInitialRef () const
 
- Protected Member Functions inherited from GrMockRenderTarget
 GrMockRenderTarget (GrMockGpu *gpu, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
 
- Protected Member Functions inherited from GrRenderTarget
 GrRenderTarget (GrGpu *, const SkISize &, int sampleCount, GrProtected, std::string_view label, sk_sp< GrAttachment > stenicl=nullptr)
 
 ~GrRenderTarget () override
 
void onAbandon () override
 
void onRelease () override
 

Detailed Description

Definition at line 173 of file GrMockTexture.h.

Constructor & Destructor Documentation

◆ GrMockTextureRenderTarget() [1/2]

GrMockTextureRenderTarget::GrMockTextureRenderTarget ( GrMockGpu gpu,
skgpu::Budgeted  budgeted,
SkISize  dimensions,
int  sampleCnt,
GrMipmapStatus  mipmapStatus,
const GrMockTextureInfo texInfo,
const GrMockRenderTargetInfo rtInfo,
std::string_view  label 
)
inline

Definition at line 176 of file GrMockTexture.h.

184 : GrSurface(gpu, dimensions, texInfo.getProtected(), label)
185 , GrMockTexture(gpu, dimensions, mipmapStatus, texInfo, label)
186 , GrMockRenderTarget(gpu, dimensions, sampleCnt, rtInfo, label) {
187 SkASSERT(texInfo.getProtected() == rtInfo.getProtected());
188 this->registerWithCache(budgeted);
189 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
void registerWithCache(skgpu::Budgeted)
GrMockRenderTarget(GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
GrMockTexture(GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, std::string_view label)
Definition: GrMockTexture.h:31
SkISize dimensions() const
Definition: GrSurface.h:27
GrSurface(GrGpu *gpu, const SkISize &dimensions, skgpu::Protected isProtected, std::string_view label)
Definition: GrSurface.h:140
GrMipmapStatus mipmapStatus() const
Definition: GrTexture.h:66
skgpu::Protected getProtected() const
Definition: GrMockTypes.h:92
skgpu::Protected getProtected() const
Definition: GrMockTypes.h:58

◆ GrMockTextureRenderTarget() [2/2]

GrMockTextureRenderTarget::GrMockTextureRenderTarget ( GrMockGpu gpu,
SkISize  dimensions,
int  sampleCnt,
GrMipmapStatus  mipmapStatus,
const GrMockTextureInfo texInfo,
const GrMockRenderTargetInfo rtInfo,
GrWrapCacheable  cacheable,
std::string_view  label 
)
inline

Definition at line 192 of file GrMockTexture.h.

200 : GrSurface(gpu, dimensions, texInfo.getProtected(), label)
201 , GrMockTexture(gpu, dimensions, mipmapStatus, texInfo, label)
202 , GrMockRenderTarget(gpu, dimensions, sampleCnt, rtInfo, label) {
203 SkASSERT(texInfo.getProtected() == rtInfo.getProtected());
204 this->registerWithCacheWrapped(cacheable);
205 }
void registerWithCacheWrapped(GrWrapCacheable)

Member Function Documentation

◆ asRenderTarget() [1/2]

const GrRenderTarget * GrMockTextureRenderTarget::asRenderTarget ( ) const
inlineoverridevirtual

Reimplemented from GrRenderTarget.

Definition at line 210 of file GrMockTexture.h.

210{ return this; }

◆ asRenderTarget() [2/2]

GrRenderTarget * GrMockTextureRenderTarget::asRenderTarget ( )
inlineoverridevirtual
Returns
the render target underlying this surface, may be null.

Reimplemented from GrRenderTarget.

Definition at line 208 of file GrMockTexture.h.

208{ return this; }

◆ asTexture() [1/2]

const GrTexture * GrMockTextureRenderTarget::asTexture ( ) const
inlineoverridevirtual

Reimplemented from GrTexture.

Definition at line 209 of file GrMockTexture.h.

209{ return this; }

◆ asTexture() [2/2]

GrTexture * GrMockTextureRenderTarget::asTexture ( )
inlineoverridevirtual
Returns
the texture associated with the surface, may be null.

Reimplemented from GrTexture.

Definition at line 207 of file GrMockTexture.h.

207{ return this; }

◆ backendFormat()

GrBackendFormat GrMockTextureRenderTarget::backendFormat ( ) const
inlineoverridevirtual

Reimplemented from GrMockTexture.

Definition at line 212 of file GrMockTexture.h.

212 {
214 }
GrBackendFormat backendFormat() const override
Definition: GrMockTexture.h:61

The documentation for this class was generated from the following file: