58 this->setBGColor(0xFFDDDDDD);
82 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
93 constexpr GrColor kPaintColors[] = {
103 for (
size_t paintType = 0; paintType <
std::size(kPaintColors) + 1; ++paintType) {
113 std::unique_ptr<GrFragmentProcessor> baseFP;
114 if (paintType >=
std::size(kPaintColors)) {
125 std::unique_ptr<GrFragmentProcessor> colorFP;
144 sdc->addDrawOp(std::move(op));
156 if (paintType >=
std::size(kPaintColors)) {
157 inputLabel.
append(
"gradient");
159 inputLabel.
appendf(
"0x%08x", kPaintColors[paintType]);
169 labelFont, labelPaint);
177 inputLabelBounds.
fBottom + 2.f - procLabelBounds.
fTop,
178 labelFont, labelPaint);
180 inputLabelBounds.
fBottom + 2.f - procLabelBounds.
fTop);
184 canvas->
drawRect(renderRect, labelPaint);
209 inline static constexpr SkScalar kPad = 10.f;
210 inline static constexpr SkScalar kRectSize = 20.f;
211 inline static constexpr int kWidth = 820;
212 inline static constexpr int kHeight = 500;
214 using INHERITED =
GM;
@ 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 sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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
void append(const char text[])
const char * c_str() const
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
DrawResult onDraw(GrRecordingContext *rContext, SkCanvas *canvas, SkString *errorMsg) override
SkString getName() const override
SkISize getISize() override
void onOnceBeforeDraw() override
ColorProcessor(TestMode mode)
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)
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
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)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)
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