36#if defined(SK_SUPPORT_LEGACY_ALPHA_BITMAP_AS_COVERAGE)
104 for (
int i = 0;
i <
count;
i += 2) {
157 if (
paint.getPathEffect() ||
paint.getMaskFilter()) {
201 *blitterPtr = blitter;
212 static const Proc gAAProcs[] = {
215 proc = gAAProcs[
fMode];
222 static const Proc gBWProcs[] = {
225 proc = gBWProcs[
fMode];
235#define MAX_DEV_PTS 32
272 proc(rec, devPts, n, bltr);
279 }
while (
count != 0);
288 m.mapRect(&dstR, srcR);
305 const SkPaint& origPaint)
const {
333 if (!
bitmap.peekPixels(&pmap)) {
360#if defined(SK_SUPPORT_LEGACY_ALPHA_BITMAP_AS_COVERAGE)
370 this->
drawRect(srcBounds, paintWithShader, &prematrix, dstBounds);
372 draw.drawRect(srcBounds, paintWithShader);
396 if (!
bitmap.peekPixels(&pmap)) {
423 draw.drawRect(r, paintWithShader);
426#if defined(SK_SUPPORT_LEGACY_ALPHA_BITMAP_AS_COVERAGE)
432 const SkMask* mask = &srcM;
435 if (
paint.getMaskFilter() &&
442 SkBlitter* blitter = blitterChooser.get();
451 clipRgn = &wrapper.
getRgn();
454 blitter->blitMaskRegion(*mask, *clipRgn);
472 if (!
bitmap.peekPixels(&pmap)) {
480 this->drawDevMask(mask,
paint);
511 mask.
image() = storage.get();
534 c.drawRect(rr, paintWithShader);
536 this->drawDevMask(mask,
paint);
static constexpr T SkAlign4(T x)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kUnknown_SkColorType
uninitialized
static void aa_poly_hair_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static bool clipHandlesSprite(const SkRasterClip &clip, int x, int y, const SkPixmap &pmap)
static void bw_pt_hair_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static SkPaint make_paint_with_image(const SkPaint &origPaint, const SkBitmap &bitmap, const SkSamplingOptions &sampling, SkMatrix *matrix=nullptr)
static void bw_line_hair_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static bool clipped_out(const SkMatrix &m, const SkRasterClip &c, const SkRect &srcR)
static void aa_line_hair_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static SkXRect make_xrect(const SkRect &r)
static void bw_square_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static void aa_square_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static void bw_poly_hair_proc(const PtProcRec &rec, const SkPoint devPts[], int count, SkBlitter *blitter)
static SkRect make_square_rad(SkPoint center, SkScalar radius)
#define SkScalarToFixed(x)
static bool SkIsFinite(T x, Pack... values)
static bool SkColorTypeIsAlphaOnly(SkColorType ct)
@ kNever_SkCopyPixelsMode
never copy src pixels (even if they are marked mutable)
sk_sp< SkShader > SkMakeBitmapShaderForPaint(const SkPaint &paint, const SkBitmap &src, SkTileMode, SkTileMode, const SkSamplingOptions &, const SkMatrix *localMatrix, SkCopyPixelsMode)
SkMaskFilterBase * as_MFB(SkMaskFilter *mf)
std::unique_ptr< uint8_t, SkFunctionObject< SkMaskBuilder::FreeImage > > SkAutoMaskFreeImage
bool SkTreatAsSprite(const SkMatrix &mat, const SkISize &size, const SkSamplingOptions &sampling, bool isAntiAlias)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
#define SkScalarRoundToInt(x)
#define SkScalarFloorToInt(x)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
constexpr int SkToInt(S x)
constexpr uint32_t SkToU32(S x)
static SkScalar center(float pos0, float pos1)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void init(const SkRasterClip &, SkBlitter *)
const SkRegion & getRgn() const
static SkBlitter * ChooseSprite(const SkPixmap &dst, const SkPaint &, const SkPixmap &src, int left, int top, SkArenaAlloc *, sk_sp< SkShader > clipShader)
static SkBlitter * Choose(const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &paint, SkArenaAlloc *, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &props)
virtual void blitH(int x, int y, int width)=0
Blit a horizontal run of one or more pixels.
@ kLines_PointMode
draw each pair of points as a line segment
@ kPolygon_PointMode
draw the array of points as a open polygon
@ kPoints_PointMode
draw each point separately
BlitterChooser * fBlitterChooser
void drawRect(const SkRect &prePaintRect, const SkPaint &, const SkMatrix *paintMatrix, const SkRect *postPaintRect) const
void drawDevicePoints(SkCanvas::PointMode, size_t count, const SkPoint[], const SkPaint &, SkDevice *) const
void drawPoints(SkCanvas::PointMode, size_t count, const SkPoint[], const SkPaint &, SkDevice *) const
void drawSprite(const SkBitmap &, int x, int y, const SkPaint &) const
void drawBitmap(const SkBitmap &, const SkMatrix &, const SkRect *dstOrNull, const SkSamplingOptions &, const SkPaint &) const override
virtual bool filterMask(SkMaskBuilder *dst, const SkMask &src, const SkMatrix &, SkIPoint *margin) const =0
static constexpr int kMScaleX
horizontal scale factor
SkScalar getTranslateY() const
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
static const SkMatrix & I()
static constexpr int kMScaleY
vertical scale factor
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
SkScalar getTranslateX() const
void setAntiAlias(bool aa)
void setDither(bool dither)
@ kFill_Style
set to fill geometry
SkScalar getStrokeWidth() const
const uint8_t * addr8() const
const SkIRect & getBounds() const
const SkRegion & bwRgn() const
sk_sp< SkShader > clipShader() const
bool quickReject(const SkIRect &rect) const
static bool FitsInFixed(const SkRect &r)
bool contains(int32_t x, int32_t y) const
static void HairLine(const SkPoint[], int count, const SkRasterClip &, SkBlitter *)
static void FillXRect(const SkXRect &, const SkRasterClip &, SkBlitter *)
static void AntiHairLine(const SkPoint[], int count, const SkRasterClip &, SkBlitter *)
static void FillIRect(const SkIRect &, const SkRasterClip &, SkBlitter *)
static void AntiFillXRect(const SkXRect &, const SkRasterClip &, SkBlitter *)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
SkSamplingOptions sampling
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
SkSamplingOptions(SkFilterMode::kLinear))
void(* Proc)(const PtProcRec &, const SkPoint devPts[], int count, SkBlitter *)
bool init(SkCanvas::PointMode, const SkPaint &, const SkMatrix *matrix, const SkRasterClip *)
Proc chooseProc(SkBlitter **blitter)
SkCanvas::PointMode fMode
SkIRect makeOutset(int32_t dx, int32_t dy) const
bool intersect(const SkIRect &r)
constexpr int32_t height() const
int32_t fTop
smaller y-axis bounds
constexpr int32_t width() const
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
int32_t fLeft
smaller x-axis bounds
bool contains(int32_t x, int32_t y) const
static SkImageInfo MakeA8(int width, int height)
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
size_t computeImageSize() const
static SkRect Make(const SkISize &size)
SkScalar fBottom
larger y-axis bounds
bool intersect(const SkRect &r)
SkScalar fLeft
smaller x-axis bounds
static SkRect MakeIWH(int w, int h)
SkScalar fRight
larger x-axis bounds
void roundOut(SkIRect *dst) const
void round(SkIRect *dst) const
void setIWH(int32_t width, int32_t height)
void set(const SkIRect &src)
SkScalar fTop
smaller y-axis bounds