/third_party/skia/tests/ |
D | RuntimeBlendTest.cpp | 23 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()
|
D | GrVxTest.cpp | 35 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()
|
D | GeometryTest.cpp | 458 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 …]
|
D | DMSAATest.cpp | 54 constexpr static float kTolerance = 2.5f / 256; in fuzzy_equals() local 56 if (!SkScalarNearlyEqual(a[i], b.vec()[i], kTolerance)) { in fuzzy_equals()
|
D | ProcessorTest.cpp | 405 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/flutter/skia/src/gpu/ops/ |
D | GrQuadPerEdgeAA.cpp | 54 static constexpr float kTolerance = 1e-2f; variable 114 correct_bad_edges(metadata.fInvLengths >= 1.f / kTolerance, &dx, &dy, nullptr); in get_edge_equations() 119 if (any(test < -kTolerance)) { in get_edge_equations() 136 if (any(metadata.fInvLengths >= 1.f / kTolerance)) { in get_optimized_outset() 196 correct_bad_edges(fma(e1x, e1x, e1y * e1y) < kTolerance * kTolerance, &e1x, &e1y, &e1w); in outset_projected_vertices() 202 correct_bad_edges(fma(e2x, e2x, e2y * e2y) < kTolerance * kTolerance, &e2x, &e2y, &e2w); in outset_projected_vertices() 277 correct_bad_coords(abs(denom) < kTolerance, &quad->fX, &quad->fY, &quad->fW); in outset_projected_vertices() 284 correct_bad_edges(fma(e1u, e1u, e1v * e1v) < kTolerance * kTolerance, &e1u, &e1v, &e1r); in outset_projected_vertices() 289 correct_bad_edges(fma(e2u, e2u, e2v * e2v) < kTolerance * kTolerance, &e2u, &e2v, &e2r); in outset_projected_vertices() 295 correct_bad_coords(abs(denom) < kTolerance, &quad->fU, &quad->fV, &quad->fR); in outset_projected_vertices() [all …]
|
/third_party/flutter/flutter/packages/flutter/test/gestures/ |
D | velocity_tracker_test.dart | 10 const double kTolerance = 0.001; // Within .1% of expected value 12 return diff.abs() < kTolerance;
|
/third_party/flutter/skia/src/core/ |
D | SkICC.cpp | 204 static constexpr float kTolerance = 1.0f / (1 << 11); in nearly_equal() local 205 return ::fabsf(x - y) <= kTolerance; in nearly_equal()
|
/third_party/skia/src/core/ |
D | SkICC.cpp | 204 static constexpr float kTolerance = 1.0f / (1 << 11); in nearly_equal() local 205 return ::fabsf(x - y) <= kTolerance; in nearly_equal()
|
/third_party/skia/tools/viewer/ |
D | SkottieSlide.cpp | 43 static constexpr float kTolerance = 0.075f; in seek() local 46 if (std::abs(player_pos - t) > kTolerance) { in seek()
|
/third_party/skia/src/gpu/geometry/ |
D | GrQuadUtils.cpp | 22 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/flutter/skia/modules/skottie/src/text/ |
D | SkottieShaper.cpp | 389 static constexpr float kTolerance = 1; in ShapeToFit() local 390 if (box.height() - res_height <= kTolerance) { in ShapeToFit()
|
/third_party/skia/src/utils/ |
D | SkShadowTessellator.cpp | 274 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()
|
/third_party/flutter/skia/src/utils/ |
D | SkShadowTessellator.cpp | 277 static constexpr auto kTolerance = 1.0e-2f; in computeConvexShadow() local 278 if (minDistSq < (inset + kTolerance)*(inset + kTolerance)) { in computeConvexShadow() 280 auto newInset = SkScalarSqrt(minDistSq) - kTolerance; in computeConvexShadow()
|
/third_party/flutter/skia/tests/ |
D | ProcessorTest.cpp | 364 static constexpr SkScalar kTolerance = 0.01f; in fuzzy_color_equals() local 366 if (!SkScalarNearlyEqual(c1[i], c2[i], kTolerance)) { in fuzzy_color_equals()
|