41 paint.setImageFilter(std::move(imf));
52 paint.setImageFilter(imf);
60 paint.setImageFilter(imf);
69 paint.setImageFilter(imf);
70 paint.setAntiAlias(
true);
76 paint.setImageFilter(imf);
85 paint.setImageFilter(std::move(imf));
101 paint.setImageFilter(std::move(imf));
106 {100,100},{150,50},{250,150},{300,100},
110 {300,300},{250,250},{150,350},{100,300},
131 paint.setImageFilter(std::move(imf));
132 paint.setAntiAlias(
true);
157 if (fAtlas ==
nullptr) {
158 fAtlas = create_atlas_image(canvas);
188 for (
size_t j = 0; j <
std::size(filters); ++j) {
189 drawProc[
i](canvas, fAtlas.
get(), r, filters[j]);
192 canvas->translate(0, DY);
204 SkCanvas* atlasCanvas = atlasSurface->getCanvas();
211 return atlasSurface->makeImageSnapshot();
216 using INHERITED =
GM;
234 name.printf(
"%s_%s",
"textfilter", fSuffix.
c_str());
250 font.setEdging(edging);
261 for (
int doSaveLayer = 0; doSaveLayer <= 1; ++doSaveLayer) {
263 for (
int useFilter = 0; useFilter <= 1; ++useFilter) {
268 this->installFilter(&
paint);
272 paint.setImageFilter(
nullptr);
274 this->drawWaterfall(canvas,
paint);
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
#define INHERITED(method,...)
#define SkDegreesToRadians(degrees)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
SkISize getISize() override
void draw_frame(SkCanvas *canvas, const SkRect &r)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
virtual void installFilter(SkPaint *paint)=0
void drawWaterfall(SkCanvas *canvas, const SkPaint &paint)
SkString getName() const override
ImageFiltersTextBaseGM(const char suffix[])
void onDraw(SkCanvas *canvas) override
void installFilter(SkPaint *paint) override
void installFilter(SkPaint *paint) override
sk_sp< SkImage > asImage() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawAtlas(const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
@ kAntiAlias
may have transparent pixels on glyph edges
@ kAlias
no transparent pixels on glyph edges
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadow(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Empty()
static sk_sp< SkImageFilter > Offset(SkScalar dx, SkScalar dy, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
const char * c_str() const
static void DrawString(SkCanvas *canvas, const char text[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint, Align align=kLeft_Align)
GM(SkColor backgroundColor=SK_ColorWHITE)
static void draw_bitmap(SkCanvas *canvas, SkImage *i, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_text(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_patch(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_paint(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_rect(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_path(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_line(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
static void draw_atlas(SkCanvas *canvas, SkImage *atlas, const SkRect &r, sk_sp< SkImageFilter > imf)
sk_sp< const SkImage > atlas
Optional< SkRect > bounds
PODArray< SkColor > colors
SkSamplingOptions sampling
DEF_SWITCHES_START aot vmservice shared library name
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
font
Font Metadata and Metrics.
const SkPoint gCubics[SkPatchUtils::kNumCtrlPts]
static constexpr SkCubicResampler Mitchell()
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
SkScalar fBottom
larger y-axis bounds
void inset(float dx, float dy)
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
void roundOut(SkIRect *dst) const
constexpr float centerX() const
constexpr float height() const
constexpr float centerY() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
SkScalar fTop
smaller y-axis bounds