24 : fShaderCaps(
std::make_unique<
SkSL::ShaderCaps>())
34 if (
options.fShaderErrorHandler) {
40#if defined(GRAPHITE_TEST_UTILS)
43 fMaxTextureAtlasSize =
options.fOptionsPriv->fMaxTextureAtlasSize;
44 fRequestedPathRendererStrategy =
options.fOptionsPriv->fPathRendererStrategy;
53 if (
options.fDisableCachedGlyphUploads) {
62 const SkISize colorAttachmentDimensions)
const {
63 return colorAttachmentDimensions;
67 if (
info.numSamples() > 1) {
121 if (texInfo.isValid() && this->isRenderable(texInfo)) {
134 if (!colorTypeInfo) {
135 SkDEBUGFAILF(
"Illegal color type (%d) and format combination.",
static_cast<int>(ct));
139 return colorTypeInfo->fReadSwizzle;
144 if (!colorTypeInfo) {
145 SkDEBUGFAILF(
"Illegal color type (%d) and format combination.",
static_cast<int>(ct));
149 return colorTypeInfo->fWriteSwizzle;
162#if !defined(SK_DISABLE_SDF_TEXT)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SkDEBUGFAILF(fmt,...)
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
@ kBGRA_1010102_SkColorType
10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
@ kA16_float_SkColorType
pixel with a half float for alpha
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
@ kRGBA_F16Norm_SkColorType
pixel with half floats in [0,1] for red, green, blue, alpha;
@ kUnknown_SkColorType
uninitialized
static constexpr bool SkToBool(const T &x)
void initSkCaps(const SkSL::ShaderCaps *)
virtual bool onIsTexturable(const TextureInfo &) const =0
virtual GraphiteResourceKey makeSamplerKey(const SamplerDesc &samplerDesc) const
virtual const ColorTypeInfo * getColorTypeInfo(SkColorType, const TextureInfo &) const =0
skgpu::Swizzle getReadSwizzle(SkColorType, const TextureInfo &) const
float fMinDistanceFieldFontSize
bool isTexturable(const TextureInfo &) const
bool fSupportBilerpFromGlyphAtlas
sktext::gpu::SDFTControl getSDFTControl(bool useSDFTForSmallText) const
int fMaxPathAtlasTextureSize
virtual SkISize getDepthAttachmentDimensions(const TextureInfo &, const SkISize colorAttachmentDimensions) const
size_t fGlyphCacheTextureMaximumBytes
skgpu::Swizzle getWriteSwizzle(SkColorType, const TextureInfo &) const
float fGlyphsAsPathsFontSize
SkColorType getRenderableColorType(SkColorType) const
std::unique_ptr< SkSL::ShaderCaps > fShaderCaps
sk_sp< SkCapabilities > capabilities() const
float glyphsAsPathsFontSize() const
DstReadRequirement getDstReadRequirement() const
virtual TextureInfo getDefaultSampledTextureInfo(SkColorType, Mipmapped mipmapped, Protected, Renderable) const =0
bool areColorTypeAndTextureInfoCompatible(SkColorType, const TextureInfo &) const
bool fRequireOrderedRecordings
ShaderErrorHandler * fShaderErrorHandler
float minDistanceFieldFontSize() const
void finishInitialization(const ContextOptions &)
const SkSL::ShaderCaps * shaderCaps() const
bool fAllowMultipleAtlasTextures
static ResourceType GenerateResourceType()
static float min(float r, float g, float b)
static SkColorType color_type_fallback(SkColorType ct)
ShaderErrorHandler * DefaultShaderErrorHandler()
bool supportsDistanceFieldText() const