136 {
167 };
168
170
172 for (
auto mode : modes) {
174 for (float alpha : {1.0f, 0.5f}) {
176 for (const auto& shader : {fShader1, fShader2}) {
177 static constexpr struct {
178 bool fHasColors;
179 bool fHasTexs;
180 } kAttrs[] = {{true, false}, {false, true}, {true, true}};
181 for (auto attrs : kAttrs) {
182 paint.setShader(shader);
183 paint.setColorFilter(cf);
184 paint.setAlphaf(alpha);
185
186 const SkColor*
colors = attrs.fHasColors ? fColors :
nullptr;
187 const SkPoint*
texs = attrs.fHasTexs ? fTexs :
nullptr;
193 }
194 }
195 }
196 }
199 }
200 }
@ 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
void translate(SkScalar dx, SkScalar dy)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
@ kTriangleFan_VertexMode
PODArray< SkColor > colors
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 const int kMeshIndexCnt
static const int kMeshVertexCnt
static constexpr uint16_t kMeshFan[]