Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored May 22, 2024
1 parent 446acfc commit 4274b00
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions path/src/path_geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fn formulate_f1_dot_f2(src: &[f32; 4]) -> [f32; 4] {
[c * c, 3.0 * b * c, 2.0 * b * b + c * a, a * b]
}

/// Solve coeff(t) == 0, returning the number of roots that lie withing 0 < t < 1.
/// Solve coeff(t) == 0, returning the number of roots that lie within 0 < t < 1.
/// coeff[0]t^3 + coeff[1]t^2 + coeff[2]t + coeff[3]
///
/// Eliminates repeated roots (so that all t_values are distinct, and are always
Expand Down Expand Up @@ -762,7 +762,7 @@ impl Conic {
dst[i] = Conic::from_points(&quadrant_points[i * 2..], QUADRANT_WEIGHT);
}

// Now compute any remaing (sub-90-degree) arc for the last conic
// Now compute any remaining (sub-90-degree) arc for the last conic
let final_pt = Point::from_xy(x, y);
let last_q = quadrant_points[quadrant * 2]; // will already be a unit-vector
let dot = last_q.dot(final_pt);
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/lowp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ fn load_8(data: &[u8; STAGE_WIDTH], a: &mut u16x16) {
fn div255(v: u16x16) -> u16x16 {
// Skia uses `vrshrq_n_u16(vrsraq_n_u16(v, v, 8), 8)` here when NEON is available,
// but it doesn't affect performance much and breaks reproducible result. Ignore it.
// NOTE: the compiler does not replace the devision with a shift.
// NOTE: the compiler does not replace the division with a shift.
(v + u16x16::splat(255)) >> u16x16::splat(8) // / u16x16::splat(256)
}

Expand Down
2 changes: 1 addition & 1 deletion src/scan/hairline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub fn stroke_path_impl(

if !clip.to_int_rect().contains(&ibounds) {
// We now cache two scalar rects, to use for culling per-segment (e.g. cubic).
// Since we're hairlining, the "bounds" of the control points isn't necessairly the
// Since we're hairlining, the "bounds" of the control points isn't necessarily the
// limit of where a segment can draw (it might draw up to 1 pixel beyond in aa-hairs).
//
// Compute the pt-bounds per segment is easy, so we do that, and then inversely adjust
Expand Down
2 changes: 1 addition & 1 deletion testing-tools/skia-rs/skia-c/skia_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static skiac_transform conv_to_transform(const SkMatrix &matrix)

static SkSurface* skiac_surface_create(int width, int height, SkAlphaType alphaType)
{
// Init() is indempotent, so can be called more than once with no adverse effect.
// Init() is idempotent, so can be called more than once with no adverse effect.
SkGraphics::Init();

auto info = SkImageInfo::Make(width, height, kRGBA_8888_SkColorType, alphaType);
Expand Down

0 comments on commit 4274b00

Please sign in to comment.