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

#include <GrMockSurfaceProxy.h>

Inheritance diagram for GrMockSurfaceProxy:
GrSurfaceProxy SkNVRefCnt< GrSurfaceProxy >

Public Member Functions

 GrMockSurfaceProxy (SkString name, std::string_view label)
 
bool instantiate (GrResourceProvider *) override
 
 SkDEBUGCODE (void onValidateSurface(const GrSurface *) override {}) size_t onUninstantiatedGpuMemorySize() const override
 
- Public Member Functions inherited from GrSurfaceProxy
virtual ~GrSurfaceProxy ()
 
bool isLazy () const
 
bool isFullyLazy () const
 
SkISize dimensions () const
 
int width () const
 
int height () const
 
SkISize backingStoreDimensions () const
 
SkRect getBoundsRect () const
 
bool isFunctionallyExact () const
 
SkRect backingStoreBoundsRect () const
 
SkIRect backingStoreBoundsIRect () const
 
const GrBackendFormatbackendFormat () const
 
bool isFormatCompressed (const GrCaps *) const
 
UniqueID uniqueID () const
 
UniqueID underlyingUniqueID () const
 
virtual bool instantiate (GrResourceProvider *)=0
 
void deinstantiate ()
 
bool canSkipResourceAllocator () const
 
virtual GrTextureProxyasTextureProxy ()
 
virtual const GrTextureProxyasTextureProxy () const
 
virtual GrRenderTargetProxyasRenderTargetProxy ()
 
virtual const GrRenderTargetProxyasRenderTargetProxy () const
 
virtual const skgpu::UniqueKeygetUniqueKey () const
 
bool isInstantiated () const
 
void isUsedAsTaskTarget ()
 
int getTaskTargetCount () const
 
GrSurfacepeekSurface () const
 
GrTexturepeekTexture () const
 
GrRenderTargetpeekRenderTarget () const
 
skgpu::Budgeted isBudgeted () const
 
bool readOnly () const
 
bool framebufferOnly () const
 
bool requiresManualMSAAResolve () const
 
size_t gpuMemorySize () const
 
std::string_view getLabel () const
 
GrSurfaceProxyPriv priv ()
 
const GrSurfaceProxyPriv priv () const
 
bool isDDLTarget () const
 
GrProtected isProtected () const
 
bool isPromiseProxy ()
 
- Public Member Functions inherited from SkNVRefCnt< GrSurfaceProxy >
 SkNVRefCnt ()
 
 ~SkNVRefCnt ()
 
bool unique () const
 
void ref () const
 
void unref () const
 
void deref () const
 
bool refCntGreaterThan (int32_t threadIsolatedTestCnt) const
 

Protected Member Functions

sk_sp< GrSurfacecreateSurface (GrResourceProvider *) const override
 
- Protected Member Functions inherited from GrSurfaceProxy
 GrSurfaceProxy (const GrBackendFormat &, SkISize, SkBackingFit, skgpu::Budgeted, GrProtected, GrInternalSurfaceFlags, UseAllocator, std::string_view label)
 
 GrSurfaceProxy (LazyInstantiateCallback &&, const GrBackendFormat &, SkISize, SkBackingFit, skgpu::Budgeted, GrProtected, GrInternalSurfaceFlags, UseAllocator, std::string_view label)
 
 GrSurfaceProxy (sk_sp< GrSurface >, SkBackingFit, UseAllocator)
 
bool ignoredByResourceAllocator () const
 
void setIgnoredByResourceAllocator ()
 
void computeScratchKey (const GrCaps &, skgpu::ScratchKey *) const
 
virtual sk_sp< GrSurfacecreateSurface (GrResourceProvider *) const =0
 
void assign (sk_sp< GrSurface > surface)
 
sk_sp< GrSurfacecreateSurfaceImpl (GrResourceProvider *, int sampleCnt, GrRenderable, skgpu::Mipmapped) const
 
void setLazyDimensions (SkISize dimensions)
 
bool instantiateImpl (GrResourceProvider *resourceProvider, int sampleCnt, GrRenderable, skgpu::Mipmapped, const skgpu::UniqueKey *)
 

Additional Inherited Members

- Public Types inherited from GrSurfaceProxy
enum class  ResolveFlags { kNone = 0 , kMSAA = 1 << 0 , kMipMaps = 1 << 1 }
 
enum class  LazyInstantiationKeyMode { kUnsynced , kSynced }
 
enum class  UseAllocator { kNo = false , kYes = true }
 
enum class  RectsMustMatch : bool { kNo = false , kYes = true }
 
using LazyInstantiateCallback = std::function< LazyCallbackResult(GrResourceProvider *, const LazySurfaceDesc &)>
 
- Static Public Member Functions inherited from GrSurfaceProxy
static sk_sp< GrSurfaceProxyCopy (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)
 
static sk_sp< GrSurfaceProxyCopy (GrRecordingContext *, sk_sp< GrSurfaceProxy > src, GrSurfaceOrigin, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, std::string_view label, sk_sp< GrRenderTask > *outTask=nullptr)
 
- Protected Attributes inherited from GrSurfaceProxy
sk_sp< GrSurfacefTarget
 
GrInternalSurfaceFlags fSurfaceFlags
 

Detailed Description

Definition at line 30 of file GrMockSurfaceProxy.h.

Constructor & Destructor Documentation

◆ GrMockSurfaceProxy()

GrMockSurfaceProxy::GrMockSurfaceProxy ( SkString  name,
std::string_view  label 
)
inline

Definition at line 32 of file GrMockSurfaceProxy.h.

35 SkISize::Make(1, 1),
41 label) {
42 SkDEBUGCODE(this->setDebugName(std::move(name)));
43 }
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)
SkDEBUGCODE(void onValidateSurface(const GrSurface *) override {}) size_t onUninstantiatedGpuMemorySize() const override
GrSurfaceProxy(const GrBackendFormat &, SkISize, SkBackingFit, skgpu::Budgeted, GrProtected, GrInternalSurfaceFlags, UseAllocator, std::string_view label)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20

Member Function Documentation

◆ createSurface()

sk_sp< GrSurface > GrMockSurfaceProxy::createSurface ( GrResourceProvider ) const
inlineoverrideprotectedvirtual

Implements GrSurfaceProxy.

Definition at line 50 of file GrMockSurfaceProxy.h.

50{ return nullptr; }

◆ instantiate()

bool GrMockSurfaceProxy::instantiate ( GrResourceProvider )
inlineoverridevirtual

Implements GrSurfaceProxy.

Definition at line 45 of file GrMockSurfaceProxy.h.

45{ return false; }

◆ SkDEBUGCODE()

GrMockSurfaceProxy::SkDEBUGCODE ( void onValidateSurface(const GrSurface *) override {}  ) const
inlineoverride

Definition at line 46 of file GrMockSurfaceProxy.h.

46 {} )
47 size_t onUninstantiatedGpuMemorySize() const override { return 0; }

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