80 {
81
82 constexpr int kRectWidth = 20;
84
85 constexpr int kCheckSize = 10;
86
87 if (!fBmpShader) {
89 }
93
95 nullptr,
99 };
100
101
108 };
109
110
111 SkColor alphas[] = {0xFFFFFFFF, 0x80808080};
112
128 };
129
131 int idx = 0;
132 const int kRectsPerRow = std::max(this->
getISize().fWidth / kRectWidth, 1);
133 for (size_t cfm = 0; cfm < std::size(modes); ++cfm) {
134 for (size_t cfc = 0; cfc < std::size(colors); ++cfc) {
136 for (
size_t s = 0;
s < std::size(shaders); ++
s) {
137 paint.setShader(shaders[
s]);
138 bool hasShader =
nullptr ==
paint.getShader();
139 int paintColorCnt = hasShader ? std::size(alphas) :
std::
size(
colors);
141 for (int pc = 0; pc < paintColorCnt; ++pc) {
142 paint.setColor(paintColors[pc]);
152 ++idx;
153 }
154 }
155 }
156 }
157 }
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static sk_sp< SkShader > make_bg_shader()
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
void setShader(sk_sp< SkShader > shader)
void setBlendMode(SkBlendMode mode)
SkISize getISize() override
sk_sp< SkBlender > blender SkRect rect
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 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
static sk_sp< SkShader > make_solid_shader()
static sk_sp< SkShader > make_trans_black_shader()
static sk_sp< SkShader > make_transparent_shader()
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)