79 {
81 if (!sdc) {
82 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
84 }
85
87 0xFFFFFFFF,
88 0xFFFF00FF,
89 0x80000000,
90 0x00000000,
91 };
92
93 constexpr GrColor kPaintColors[] = {
94 0xFFFFFFFF,
95 0xFF0000FF,
96 0x80000080,
97 0x00000000,
98 };
99
103 for (
size_t paintType = 0; paintType <
std::size(kPaintColors) + 1; ++paintType) {
105
108
109
111
112
113 std::unique_ptr<GrFragmentProcessor> baseFP;
114 if (paintType >=
std::size(kPaintColors)) {
119 } else {
122 }
123
124
125 std::unique_ptr<GrFragmentProcessor> colorFP;
126 switch (fMode) {
130 break;
131
135 break;
136 }
137
138
140 std::move(colorFP),
142 renderRect,
144 sdc->addDrawOp(std::move(op));
145 }
146
147
148
156 if (paintType >=
std::size(kPaintColors)) {
157 inputLabel.append("gradient");
158 } else {
159 inputLabel.appendf("0x%08x", kPaintColors[paintType]);
160 }
163
165
166 labelFont.
measureText(inputLabel.c_str(), inputLabel.size(),
169 labelFont, labelPaint);
170
172
177 inputLabelBounds.
fBottom + 2.f - procLabelBounds.
fTop,
178 labelFont, labelPaint);
180 inputLabelBounds.
fBottom + 2.f - procLabelBounds.
fTop);
181
184 canvas->
drawRect(renderRect, labelPaint);
185
187
188
196 maxW = 0;
197 }
198 }
199 }
200
202 }
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static std::unique_ptr< GrFragmentProcessor > MakeColor(SkPMColor4f color)
static std::unique_ptr< GrFragmentProcessor > ModulateRGBA(std::unique_ptr< GrFragmentProcessor > child, const SkPMColor4f &color)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void setTypeface(sk_sp< SkTypeface > tf)
SkScalar measureText(const void *text, size_t byteLength, SkTextEncoding encoding, SkRect *bounds=nullptr) const
void setEdging(Edging edging)
void setSize(SkScalar textSize)
@ kAntiAlias
may have transparent pixels on glyph edges
static const SkMatrix & I()
void setStyle(Style style)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static float max(float r, float g, float b)
std::unique_ptr< GrFragmentProcessor > Make(const SkMaskFilter *maskfilter, const GrFPArgs &args, const SkMatrix &ctm)
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
GrOp::Owner MakeRect(GrRecordingContext *context, GrPaint &&paint, const SkRect &drawRect, const SkRect &localRect, const SkMatrix &localM)
SurfaceDrawContext * TopDeviceSurfaceDrawContext(const SkCanvas *canvas)
static SkRGBA4f FromBytes_RGBA(uint32_t color)
SkScalar fBottom
larger y-axis bounds
constexpr SkRect makeOffset(float dx, float dy) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkScalar fRight
larger x-axis bounds
void offset(float dx, float dy)
constexpr float height() const
SkScalar fTop
smaller y-axis bounds