8#ifndef SkShaderBase_DEFINED
9#define SkShaderBase_DEFINED
139 , fTotalLocalMatrix(totalLocalMatrix)
140 , fPendingLocalMatrix(pendingLocalMatrix)
141 , fTotalMatrixIsValid(totalIsValid)
142 , fCTMApplied(ctmApplied) {}
153 bool fTotalMatrixIsValid =
true;
157 bool fCTMApplied =
false;
162#define SK_ALL_SHADERS(M) \
180#define SK_ALL_GRADIENTS(M) \
200#define M(type) k##type,
209#define M(type) k##type,
256 SkMatrix* localMatrix =
nullptr)
const {
385#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
396#ifdef SK_ENABLE_LEGACY_SHADERCONTEXT
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkShaderBase * as_SB(SkShader *shader)
void SkRegisterEmptyShaderFlattenable()
void SkRegisterWorkingColorSpaceShaderFlattenable()
void SkRegisterColor4ShaderFlattenable()
#define SK_ALL_GRADIENTS(M)
void SkRegisterColorShaderFlattenable()
void SkRegisterPerlinNoiseShaderFlattenable()
void SkRegisterBlendShaderFlattenable()
void SkRegisterCoordClampShaderFlattenable()
#define SK_ALL_SHADERS(M)
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
static SkMatrix Concat(const SkMatrix &a, const SkMatrix &b)
bool invert(SkMatrix *inverse) const
uint8_t getPaintAlpha() const
virtual void shadeSpan(int x, int y, SkPMColor[], int count)=0
Context(const SkShaderBase &shader, const ContextRec &)
virtual uint32_t getFlags() const
const SkMatrix & getTotalInverse() const
const SkShaderBase & fShader
virtual bool onAsLuminanceColor(SkColor4f *) const
sk_sp< SkShader > makeInvertAlpha() const
@ kOpaqueAlpha_Flag
set if all of the colors will be opaque
virtual GradientType asGradient(GradientInfo *info=nullptr, SkMatrix *localMatrix=nullptr) const
virtual bool isConstant() const
bool appendRootStages(const SkStageRec &rec, const SkMatrix &ctm) const
void flatten(SkWriteBuffer &) const override
bool asLuminanceColor(SkColor4f *) const
sk_sp< SkShader > makeWithCTM(const SkMatrix &) const
static Type GetFlattenableType()
static SkMatrix ConcatLocalMatrices(const SkMatrix &parentLM, const SkMatrix &childLM)
virtual ShaderType type() const =0
Type getFlattenableType() const override
virtual SkImage * onIsAImage(SkMatrix *, SkTileMode[2]) const
Context * makeContext(const ContextRec &, SkArenaAlloc *) const
virtual bool appendStages(const SkStageRec &, const SkShaders::MatrixRec &) const =0
virtual sk_sp< SkShader > makeAsALocalMatrixShader(SkMatrix *localMatrix) const
static void RegisterFlattenables()
virtual SkRuntimeEffect * asRuntimeEffect() const
static sk_sp< SkShaderBase > Deserialize(const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
void markTotalMatrixInvalid()
std::optional< MatrixRec > apply(const SkStageRec &rec, const SkMatrix &postInv={}) const
bool totalInverse(SkMatrix *out) const
MatrixRec applied() const
bool totalMatrixIsValid() const
std::tuple< SkMatrix, bool > applyForFragmentProcessor(const SkMatrix &postInv) const
MatrixRec concat(const SkMatrix &m) const
bool hasPendingMatrix() const
SkMatrix totalMatrix() const
bool rasterPipelineCoordsAreSeeded() const
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
SkColorType fDstColorType
const SkShaders::MatrixRec fMatrixRec
ContextRec(SkAlpha paintAlpha, const SkShaders::MatrixRec &matrixRec, SkColorType dstColorType, SkColorSpace *dstColorSpace, const SkSurfaceProps &props)
static ContextRec Concat(const ContextRec &parentRec, const SkMatrix &localM)
bool isLegacyCompatible(SkColorSpace *shadersColorSpace) const
SkColorSpace * fDstColorSpace
uint32_t fGradientFlags
see SkGradientShader::Flags
SkPoint fPoint[2]
Type specific, see above.
SkColor * fColors
The colors in the gradient.
int fColorCount
In-out parameter, specifies passed size.
SkScalar fRadius[2]
Type specific, see above.
SkScalar * fColorOffsets
The unit offset for color transitions.
std::shared_ptr< const fml::Mapping > data