Home
last modified time | relevance | path

Searched refs:kTolerance (Results 1 – 9 of 9) sorted by relevance

/third_party/skia/tests/
DRuntimeBlendTest.cpp23 const int kTolerance = 1; in nearly_equal() local
24 return abs((int)SkColorGetA(x) - (int)SkColorGetA(y)) <= kTolerance && in nearly_equal()
25 abs((int)SkColorGetR(x) - (int)SkColorGetR(y)) <= kTolerance && in nearly_equal()
26 abs((int)SkColorGetG(x) - (int)SkColorGetG(y)) <= kTolerance && in nearly_equal()
27 abs((int)SkColorGetB(x) - (int)SkColorGetB(y)) <= kTolerance; in nearly_equal()
DGrVxTest.cpp35 constexpr static float kTolerance = 1.f / (1 << 20); in DEF_TEST() local
37 grvx::cross({a,b}, {c,d}), SkPoint::CrossProduct({a,b}, {c,d}), kTolerance)); in DEF_TEST()
39 grvx::dot({a,b}, {c,d}), SkPoint::DotProduct({a,b}, {c,d}), kTolerance)); in DEF_TEST()
DGeometryTest.cpp458 constexpr float kTolerance = 1e-3f; in test_chop_quad_at_midtangent() local
467 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(leftRotation, fullRotation/2, kTolerance)); in test_chop_quad_at_midtangent()
468 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(rightRotation, fullRotation/2, kTolerance)); in test_chop_quad_at_midtangent()
474 constexpr float kTolerance = 1e-3f; in test_chop_cubic_at_midtangent() local
490 (SkScalarNearlyEqual(fullRotation, 2*SK_ScalarPI, kTolerance) || in test_chop_cubic_at_midtangent()
491 SkScalarNearlyEqual(fullRotation, 0, kTolerance))) { in test_chop_cubic_at_midtangent()
496 REPORTER_ASSERT(reporter, std::abs(leftRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
497 REPORTER_ASSERT(reporter, std::abs(rightRotation) - kTolerance <= SK_ScalarPI); in test_chop_cubic_at_midtangent()
503 SkScalarNearlyEqual(fullRotation, SK_ScalarPI, kTolerance))) { in test_chop_cubic_at_midtangent()
508 kTolerance)); in test_chop_cubic_at_midtangent()
[all …]
DDMSAATest.cpp54 constexpr static float kTolerance = 2.5f / 256; in fuzzy_equals() local
56 if (!SkScalarNearlyEqual(a[i], b.vec()[i], kTolerance)) { in fuzzy_equals()
DProcessorTest.cpp405 static constexpr SkScalar kTolerance = 0.01f; in fuzzy_color_equals() local
407 if (!SkScalarNearlyEqual(c1[i], c2[i], kTolerance)) { in fuzzy_color_equals()
/third_party/skia/src/gpu/geometry/
DGrQuadUtils.cpp22 static constexpr float kTolerance = 1e-9f; variable
768 correct_bad_coords(abs(denom) < kTolerance, &px, &py, nullptr); in computeDegenerateQuad()
848 if (dists1[i] < -kDistTolerance && abs(eDenom[0]) > kTolerance) { in computeDegenerateQuad()
854 } else if (dists2[i] < -kDistTolerance && abs(eDenom[1]) > kTolerance) { in computeDegenerateQuad()
1086 correct_bad_coords(abs(denom) < kTolerance, &fX, &fY, &fW); in moveTo()
1104 correct_bad_coords(abs(denom) < kTolerance, &fU, &fV, &fR); in moveTo()
1106 correct_bad_coords(abs(denom) < kTolerance, &fU, &fV, nullptr); in moveTo()
/third_party/skia/tools/viewer/
DSkottieSlide.cpp43 static constexpr float kTolerance = 0.075f; in seek() local
46 if (std::abs(player_pos - t) > kTolerance) { in seek()
/third_party/skia/src/core/
DSkICC.cpp217 static constexpr float kTolerance = 1.0f / (1 << 11); in nearly_equal() local
218 return ::fabsf(x - y) <= kTolerance; in nearly_equal()
/third_party/skia/src/utils/
DSkShadowTessellator.cpp274 static constexpr auto kTolerance = 1.0e-2f; in computeConvexShadow() local
275 if (minDistSq < (inset + kTolerance)*(inset + kTolerance)) { in computeConvexShadow()
277 auto newInset = SkScalarSqrt(minDistSq) - kTolerance; in computeConvexShadow()