41 blitter->
blitH(
x, fy >> 16, 1);
43 }
while (++
x < stopx);
51 blitter->
blitH(fx >> 16,
y, 1);
53 }
while (++
y < stopy);
57static bool canConvertFDot6ToFixed(
SkFDot6 x) {
58 const int maxDot6 =
SK_MaxS32 >> (16 - 6);
76 for (
int i = 0;
i < arrayCount - 1; ++
i) {
98 SkASSERT(canConvertFDot6ToFixed(x0));
99 SkASSERT(canConvertFDot6ToFixed(y0));
100 SkASSERT(canConvertFDot6ToFixed(x1));
101 SkASSERT(canConvertFDot6ToFixed(y1));
124 blitter = clipper.
apply(origBlitter,
clip);
142#if defined(SK_BUILD_FOR_FUZZER)
143 if ((ix1 - ix0) > 100000 || (ix1 - ix0) < 0) {
150 horiline(ix0, ix1, startY, slope, blitter);
162#if defined(SK_BUILD_FOR_FUZZER)
163 if ((iy1 - iy0) > 100000 || (iy1 - iy0) < 0) {
170 vertline(iy0, iy1, startX, slope, blitter);
197 if (
clip.quickReject(r)) {
200 if (!
clip.quickContains(r)) {
203 clipRgn = &
clip.bwRgn();
206 clipRgn = &wrapper.
getRgn();
209 blitter = clipper.
apply(blitter, clipRgn);
231#define kMaxCubicSubdivideLevel 9
232#define kMaxQuadSubdivideLevel 5
251 return idx + (idy >> 1);
253 return idy + (idx >> 1);
261 SkQuadCoeff coeff(pts);
287 for (
int i = 1;
i < 3; ++
i) {
303 return a.fLeft <
b.fRight &&
b.fLeft <
a.fRight &&
304 a.fTop <
b.fBottom &&
b.fTop <
a.fBottom;
332 value.store(components);
333 return std::max(components[0], components[1]);
342 const float2 oneThird(1.0f / 3.0f);
343 const float2 twoThird(2.0f / 3.0f);
345 float2 p13 = oneThird * p3 + twoThird * p0;
346 float2 p23 = oneThird * p0 + twoThird * p3;
366 return lt_90(pts[1], pts[0], pts[3]) &&
367 lt_90(pts[2], pts[0], pts[3]) &&
368 lt_90(pts[1], pts[3], pts[0]) &&
369 lt_90(pts[2], pts[3], pts[0]);
376 return (sk_bit_cast<mask2>(
x) & exp_mask) != exp_mask;
384 SkPoint tmp[2] = { pts[0], pts[3] };
385 lineproc(tmp, 2,
clip, blitter);
389 SkCubicCoeff coeff(pts);
409 if (
all(is_finite)) {
420 for (
int i = 1;
i < 4; ++
i) {
472template <SkPa
int::Cap capStyle>
480 int controls = ptCount - 1;
483 tangent = *first - *++ctrl;
484 }
while (tangent.
isZero() && --controls > 0);
487 controls = ptCount - 1;
492 first->
fX += tangent.
fX * capOutset;
493 first->
fY += tangent.
fY * capOutset;
495 }
while (++controls < ptCount);
499 SkPoint* last = &pts[ptCount - 1];
501 int controls = ptCount - 1;
504 tangent = *last - *--ctrl;
505 }
while (tangent.
isZero() && --controls > 0);
508 controls = ptCount - 1;
513 last->
fX += tangent.
fX * capOutset;
514 last->
fY += tangent.
fY * capOutset;
516 }
while (++controls < ptCount);
520template <SkPa
int::Cap capStyle>
523 if (
path.isEmpty()) {
529 SkRect insetStorage, outsetStorage;
530 const SkRect* insetClip =
nullptr;
531 const SkRect* outsetClip =
nullptr;
535 const SkIRect ibounds =
path.getBounds().roundOut().makeOutset(capOut, capOut);
543 wrap.
init(rclip, blitter);
563 outsetStorage = insetStorage.
makeOutset(1, 1);
564 insetStorage.
inset(1, 1);
575 insetClip = &insetStorage;
577 outsetClip = &outsetStorage;
583 SkPoint pts[4], firstPt, lastPt;
590 while (iter !=
end) {
591 auto [pathVerb, pathPts,
w] = *iter++;
597 firstPt = lastPt = pts[0];
601 extend_pts<capStyle>(prevVerb, nextVerb, pts, 2);
603 lineproc(pts, 2,
clip, blitter);
608 extend_pts<capStyle>(prevVerb, nextVerb, pts, 3);
615 extend_pts<capStyle>(prevVerb, nextVerb, pts, 3);
630 extend_pts<capStyle>(prevVerb, nextVerb, pts, 4);
640 extend_pts<capStyle>(prevVerb, nextVerb, pts, 2);
642 lineproc(pts, 2,
clip, blitter);
658 hair_path<SkPaint::kButt_Cap>(
path,
clip, blitter, SkScan::HairLineRgn);
662 hair_path<SkPaint::kButt_Cap>(
path,
clip, blitter, SkScan::AntiHairLineRgn);
666 hair_path<SkPaint::kSquare_Cap>(
path,
clip, blitter, SkScan::HairLineRgn);
670 hair_path<SkPaint::kSquare_Cap>(
path,
clip, blitter, SkScan::AntiHairLineRgn);
674 hair_path<SkPaint::kRound_Cap>(
path,
clip, blitter, SkScan::HairLineRgn);
678 hair_path<SkPaint::kRound_Cap>(
path,
clip, blitter, SkScan::AntiHairLineRgn);
687 if (strokeSize.
fX < 0 || strokeSize.
fY < 0) {
720 HairLineRgn(pts,
count, &
clip.bwRgn(), blitter);
734 HairLineRgn(pts,
count, clipRgn, blitter);
741 AntiHairLineRgn(pts,
count, &
clip.bwRgn(), blitter);
749 if (!
clip.quickContains(r.
roundOut().makeOutset(1, 1))) {
754 AntiHairLineRgn(pts,
count, clipRgn, blitter);
SkFixed SkFDot6ToFixed(SkFDot6 x)
#define SkScalarToFDot6(x)
#define SkFixedDiv(numer, denom)
static bool SkIsFinite(T x, Pack... values)
int SkChopCubicAtMaxCurvature(const SkPoint src[4], SkPoint dst[13], SkScalar tValues[3])
static skvx::float2 from_point(const SkPoint &point)
static int SkCLZ(uint32_t mask)
static constexpr int32_t SK_MaxS32
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
void swap(sk_sp< T > &a, sk_sp< T > &b)
static int32_t SkAbs32(int32_t value)
#define SkScalarCeilToInt(x)
#define SkScalarFloorToInt(x)
#define kMaxQuadSubdivideLevel
#define kMaxCubicSubdivideLevel
skvx::Vec< 2, uint32_t > mask2
static SkScalar max_component(const float2 &value)
static void haircubic(const SkPoint pts[4], const SkRegion *clip, const SkRect *insetClip, const SkRect *outsetClip, SkBlitter *blitter, int level, SkScan::HairRgnProc lineproc)
static void hairquad(const SkPoint pts[3], const SkRegion *clip, const SkRect *insetClip, const SkRect *outsetClip, SkBlitter *blitter, int level, SkScan::HairRgnProc lineproc)
static bool quick_cubic_niceness_check(const SkPoint pts[4])
static int compute_quad_level(const SkPoint pts[3])
static SkRect compute_nocheck_cubic_bounds(const SkPoint pts[4])
static uint32_t compute_int_quad_dist(const SkPoint pts[3])
static bool geometric_overlap(const SkRect &a, const SkRect &b)
static bool lt_90(SkPoint p0, SkPoint pivot, SkPoint p2)
void extend_pts(SkPath::Verb prevVerb, SkPath::Verb nextVerb, SkPoint *pts, int ptCount)
static bool is_inverted(const SkRect &r)
void hair_path(const SkPath &path, const SkRasterClip &rclip, SkBlitter *blitter, SkScan::HairRgnProc lineproc)
static void hair_quad(const SkPoint pts[3], const SkRegion *clip, SkBlitter *blitter, int level, SkScan::HairRgnProc lineproc)
static void vertline(int y, int stopy, SkFixed fx, SkFixed dx, SkBlitter *blitter)
static void hair_cubic(const SkPoint pts[4], const SkRegion *clip, SkBlitter *blitter, SkScan::HairRgnProc lineproc)
static SkRect compute_nocheck_quad_bounds(const SkPoint pts[3])
static int compute_cubic_segs(const SkPoint pts[4])
static void horiline(int x, int stopx, SkFixed fy, SkFixed dy, SkBlitter *blitter)
static bool geometric_contains(const SkRect &outer, const SkRect &inner)
static mask2 float2_is_finite(const float2 &x)
void init(const SkRasterClip &, SkBlitter *)
const SkRegion & getRgn() const
SkBlitter * apply(SkBlitter *blitter, const SkRegion *clip, const SkIRect *bounds=nullptr)
virtual void blitH(int x, int y, int width)=0
Blit a horizontal run of one or more pixels.
virtual void blitRect(int x, int y, int width, int height)
Blit a solid rectangle one or more pixels wide.
static bool IntersectLine(const SkPoint src[2], const SkRect &clip, SkPoint dst[2])
@ kButt_Cap
no stroke extension
static int PtsInIter(unsigned verb)
SkPath::RangeIter RangeIter
const SkRect & getBounds() const
bool isRect(SkRect *rect, bool *isClosed=nullptr, SkPathDirection *direction=nullptr) const
const SkRegion & bwRgn() const
bool quickContains(const SkIRect &rect) const
bool quickReject(const SkIRect &rect) const
static void HairLine(const SkPoint[], int count, const SkRasterClip &, SkBlitter *)
static void HairRoundPath(const SkPath &, const SkRasterClip &, SkBlitter *)
static void HairPath(const SkPath &, const SkRasterClip &, SkBlitter *)
static void HairSquarePath(const SkPath &, const SkRasterClip &, SkBlitter *)
static void FillRect(const SkRect &, const SkRasterClip &, SkBlitter *)
static void AntiHairPath(const SkPath &, const SkRasterClip &, SkBlitter *)
static void FrameRect(const SkRect &, const SkPoint &strokeSize, const SkRasterClip &, SkBlitter *)
static void AntiHairRoundPath(const SkPath &, const SkRasterClip &, SkBlitter *)
static void AntiHairLine(const SkPoint[], int count, const SkRasterClip &, SkBlitter *)
static void AntiHairSquarePath(const SkPath &, const SkRasterClip &, SkBlitter *)
void(* HairRgnProc)(const SkPoint[], int count, const SkRegion *, SkBlitter *)
static void HairRect(const SkRect &, const SkRasterClip &, SkBlitter *)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
static float max(float r, float g, float b)
static float min(float r, float g, float b)
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
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
SIN Vec< N, float > abs(const Vec< N, float > &x)
SIT bool all(const Vec< 1, T > &x)
SIT T max(const Vec< 1, T > &x)
SIT T min(const Vec< 1, T > &x)
bool intersect(const SkIRect &r)
static bool Intersects(const SkIRect &a, const SkIRect &b)
int32_t fBottom
larger y-axis bounds
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
constexpr int32_t height() const
int32_t fTop
smaller y-axis bounds
constexpr int32_t width() const
int32_t fLeft
smaller x-axis bounds
void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom)
bool contains(int32_t x, int32_t y) const
int32_t fRight
larger x-axis bounds
SkPath::RangeIter begin()
static float DotProduct(const SkVector &a, const SkVector &b)
void set(float x, float y)
SkScalar fBottom
larger y-axis bounds
void inset(float dx, float dy)
SkScalar fLeft
smaller x-axis bounds
void outset(float dx, float dy)
SkRect makeOutset(float dx, float dy) const
SkScalar fRight
larger x-axis bounds
void roundOut(SkIRect *dst) const
constexpr float height() const
void setLTRB(float left, float top, float right, float bottom)
void setBounds(const SkPoint pts[], int count)
constexpr float width() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
void set(const SkIRect &src)
SkScalar fTop
smaller y-axis bounds
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)
SKVX_ALWAYS_INLINE void store(void *ptr) const