7#ifndef GrMockTexture_DEFINED
8#define GrMockTexture_DEFINED
27namespace skgpu {
class ScratchKey; }
36 std::string_view label)
47 std::string_view label)
73 std::string_view label)
91 void onSetLabel()
override{}
105 std::string_view label)
115 std::string_view label)
134 if (numColorSamples > 1) {
160 std::string_view label)
166 void onSetLabel()
override{}
183 std::string_view label)
199 std::string_view label)
217 void onAbandon()
override {
222 void onRelease()
override {
227 size_t onGpuMemorySize()
const override {
229 if (numColorSamples > 1) {
237 void onSetLabel()
override{}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
int GrBackendFormatStencilBits(const GrBackendFormat &format)
void registerWithCacheWrapped(GrWrapCacheable)
void registerWithCache(skgpu::Budgeted)
GrMockRenderTarget(GrMockGpu *gpu, Wrapped, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
size_t onGpuMemorySize() const override
GrBackendRenderTarget getBackendRenderTarget() const override
bool completeStencilAttachment(GrAttachment *, bool useMSAASurface) override
bool canAttemptStencilAttachment(bool useMSAASurface) const override
GrMockRenderTarget(GrMockGpu *gpu, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
GrBackendFormat backendFormat() const override
GrMockRenderTarget(GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, int sampleCnt, const GrMockRenderTargetInfo &info, std::string_view label)
const GrTexture * asTexture() const override
GrTexture * asTexture() override
GrMockTextureRenderTarget(GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, int sampleCnt, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &texInfo, const GrMockRenderTargetInfo &rtInfo, std::string_view label)
GrBackendFormat backendFormat() const override
GrRenderTarget * asRenderTarget() override
const GrRenderTarget * asRenderTarget() const override
GrMockTextureRenderTarget(GrMockGpu *gpu, SkISize dimensions, int sampleCnt, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &texInfo, const GrMockRenderTargetInfo &rtInfo, GrWrapCacheable cacheable, std::string_view label)
GrBackendTexture getBackendTexture() const override
GrMockTexture(GrMockGpu *gpu, const SkISize &dims, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, std::string_view label)
void textureParamsModified() override
bool onStealBackendTexture(GrBackendTexture *, SkImages::BackendTextureReleaseProc *) override
GrMockTexture(GrMockGpu *gpu, SkISize dimensions, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, GrWrapCacheable cacheable, GrIOType ioType, std::string_view label)
GrBackendFormat backendFormat() const override
void onAbandon() override
void onRelease() override
GrMockTexture(GrMockGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, GrMipmapStatus mipmapStatus, const GrMockTextureInfo &info, std::string_view label)
~GrMockTexture() override
GrAttachment * getStencilAttachment() const
void onAbandon() override
void onRelease() override
GrRenderTarget(GrGpu *, const SkISize &, int sampleCount, GrProtected, std::string_view label, sk_sp< GrAttachment > stenicl=nullptr)
int numStencilBits(bool useMSAASurface) const
SkISize dimensions() const
static size_t ComputeSize(const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
void onAbandon() override
void onRelease() override
skgpu::Mipmapped mipmapped() const
GrMipmapStatus mipmapStatus() const
GrTexture(GrGpu *, const SkISize &, GrProtected, GrTextureType, GrMipmapStatus, std::string_view label)
void computeScratchKey(skgpu::ScratchKey *) const override
std::function< void(GrBackendTexture)> BackendTextureReleaseProc
GrBackendFormat getBackendFormat() const
skgpu::Protected getProtected() const
GrBackendFormat getBackendFormat() const
skgpu::Protected getProtected() const