63 static constexpr CoeffRec kCoeffs[] = {
89 *
src = kCoeffs[
static_cast<int>(
mode)].fSrc;
98 auto stage = SkRasterPipelineOp::srcover;
155 dst_ctx = { &dst_storage, 0 },
156 res_ctx = { &res_storage, 0 };
158 p.append(SkRasterPipelineOp::load_f32, &dst_ctx);
159 p.append(SkRasterPipelineOp::move_src_dst);
160 p.append(SkRasterPipelineOp::load_f32, &src_ctx);
162 p.append(SkRasterPipelineOp::store_f32, &res_ctx);
209 const auto bm =
paint.asBlendMode();
213 switch (bm.value()) {
bool SkBlendMode_AsCoeff(SkBlendMode mode, SkBlendModeCoeff *src, SkBlendModeCoeff *dst)
static bool just_solid_color(const SkPaint &p)
void SkBlendMode_AppendStages(SkBlendMode mode, SkRasterPipeline *p)
bool SkBlendMode_SupportsCoverageAsAlpha(SkBlendMode mode)
SkBlendFastPath CheckFastPath(const SkPaint &paint, bool dstIsOpaque)
bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode mode, bool rgb_coverage)
const char * SkBlendMode_Name(SkBlendMode bm)
SkPMColor4f SkBlendMode_Apply(SkBlendMode mode, const SkPMColor4f &src, const SkPMColor4f &dst)
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kSaturation
saturation of source with hue and luminosity of destination
@ kColorBurn
darken destination to reflect source
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kHue
hue of source with saturation and luminosity of destination
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kColorDodge
brighten destination to reflect source
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kSoftLight
lighten or darken, depending on source
@ kDifference
rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
@ kOverlay
multiply or screen, depending on destination
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
@ kColor
hue and saturation of source with luminosity of destination
@ kHardLight
multiply or screen, depending on source
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
constexpr SkPMColor4f SK_PMColor4fTRANSPARENT
constexpr SkAlpha SK_AlphaOPAQUE
static size_t difference(size_t minuend, size_t subtrahend)
static void luminosity(float dr, float dg, float db, float *sr, float *sg, float *sb)
static void hue(float dr, float dg, float db, float *sr, float *sg, float *sb)
static void saturation(float dr, float dg, float db, float *sr, float *sg, float *sb)
Int96 multiply(int64_t a, int32_t b)
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 mode
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)