8#ifndef GrMockCaps_DEFINED
9#define GrMockCaps_DEFINED
33namespace GrTest {
struct TestFormatColorTypeCombination; }
71 auto ct =
format.asMockColorType();
81 auto index =
static_cast<int>(
format.asMockColorType());
90 int sampleCount = 1)
const override {
122 case GrMockOptions::ConfigOptions::Renderability::kNo:
124 case GrMockOptions::ConfigOptions::Renderability::kNonMSAA:
126 case GrMockOptions::ConfigOptions::Renderability::kMSAA:
127 return kMaxSampleCnt;
144 return {surfaceColorType, 1};
167#if defined(GR_TEST_UTILS)
168 std::vector<GrTest::TestFormatColorTypeCombination> getTestingCombinations()
const override;
172 bool onSurfaceSupportsWritePixels(
const GrSurface*)
const override {
return true; }
184 bool onAreColorTypeAndFormatCompatible(
GrColorType ct,
199 return ct ==
format.asMockColorType();
204 return SupportedRead{srcColorType, 1};
212 static const int kMaxSampleCnt = 16;
static constexpr GrColorFormatDesc GrGetColorTypeDesc(GrColorType ct)
static constexpr int32_t SK_MaxS32
bool fSupportsProtectedContent
int fMaxPreferredRenderTargetSize
std::unique_ptr< GrShaderCaps > fShaderCaps
GrCaps(const GrContextOptions &)
bool fHalfFloatVertexAttributeSupport
bool fSampleLocationsSupport
bool areColorTypeAndFormatCompatible(GrColorType grCT, const GrBackendFormat &format) const
void finishInitialization(const GrContextOptions &options)
bool fDrawInstancedSupport
bool isFormatCopyable(const GrBackendFormat &format) const override
int maxRenderTargetSampleCount(const GrBackendFormat &format) const override
GrBackendFormat getBackendFormatFromCompressionType(SkTextureCompressionType) const override
uint64_t computeFormatKey(const GrBackendFormat &) const override
bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const override
GrProgramDesc makeDesc(GrRenderTarget *, const GrProgramInfo &, ProgramDescOverrideFlags) const override
bool isFormatTexturable(const GrBackendFormat &format, GrTextureType) const override
skgpu::Swizzle getWriteSwizzle(const GrBackendFormat &format, GrColorType ct) const override
GrMockCaps(const GrContextOptions &contextOptions, const GrMockOptions &options)
int getRenderTargetSampleCount(int requestCount, GrColorType) const
bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const override
int getRenderTargetSampleCount(int requestCount, const GrBackendFormat &format) const override
bool isFormatSRGB(const GrBackendFormat &format) const override
SupportedWrite supportedWritePixelsColorType(GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const override
int maxRenderTargetSampleCount(GrColorType ct) const
SurfaceReadPixelsSupport surfaceSupportsReadPixels(const GrSurface *surface) const override
uint32_t uint32_t * format
static float min(float r, float g, float b)
Renderability fRenderability
ConfigOptions fCompressedOptions[kSkTextureCompressionTypeCount]
ConfigOptions fConfigOptions[kGrColorTypeCnt]