Lines Matching refs:kPrecision
13 constexpr static int kPrecision = 4; // 1/4 pixel max error. variable
202 constexpr static float k = (3 * 2) / (8 * (1.f/kPrecision)); in DEF_TEST()
205 float referenceValue = wangs_formula_cubic_reference_impl(kPrecision, pts); in DEF_TEST()
207 float c = GrWangsFormula::cubic(kPrecision, pts); in DEF_TEST()
209 REPORTER_ASSERT(r, GrWangsFormula::cubic_log2(kPrecision, pts) == level); in DEF_TEST()
211 referenceValue = wangs_formula_cubic_reference_impl(kPrecision, pts); in DEF_TEST()
213 c = GrWangsFormula::cubic(kPrecision, pts); in DEF_TEST()
215 REPORTER_ASSERT(r, GrWangsFormula::cubic_log2(kPrecision, pts) == level + 1); in DEF_TEST()
221 constexpr static float k = 2 / (8 * (1.f/kPrecision)); in DEF_TEST()
224 float referenceValue = wangs_formula_quadratic_reference_impl(kPrecision, pts); in DEF_TEST()
226 float q = GrWangsFormula::quadratic(kPrecision, pts); in DEF_TEST()
228 REPORTER_ASSERT(r, GrWangsFormula::quadratic_log2(kPrecision, pts) == level); in DEF_TEST()
230 referenceValue = wangs_formula_quadratic_reference_impl(kPrecision, pts); in DEF_TEST()
232 q = GrWangsFormula::quadratic(kPrecision, pts); in DEF_TEST()
234 REPORTER_ASSERT(r, GrWangsFormula::quadratic_log2(kPrecision, pts) == level + 1); in DEF_TEST()
239 float f = std::max(1.f, wangs_formula_cubic_reference_impl(kPrecision, pts)); in DEF_TEST()
240 int f_log2 = GrWangsFormula::cubic_log2(kPrecision, pts); in DEF_TEST()
242 float c = std::max(1.f, GrWangsFormula::cubic(kPrecision, pts)); in DEF_TEST()
247 float f = std::max(1.f, wangs_formula_quadratic_reference_impl(kPrecision, pts)); in DEF_TEST()
248 int f_log2 = GrWangsFormula::quadratic_log2(kPrecision, pts); in DEF_TEST()
250 float q = std::max(1.f, GrWangsFormula::quadratic(kPrecision, pts)); in DEF_TEST()
282 int expected = GrWangsFormula::cubic_log2(kPrecision, ptsXformed); in DEF_TEST()
283 int actual = GrWangsFormula::cubic_log2(kPrecision, pts, GrVectorXform(m)); in DEF_TEST()
290 int expected = GrWangsFormula::quadratic_log2(kPrecision, ptsXformed); in DEF_TEST()
291 int actual = GrWangsFormula::quadratic_log2(kPrecision, pts, GrVectorXform(m)); in DEF_TEST()
315 REPORTER_ASSERT(r, GrWangsFormula::worst_case_cubic(kPrecision, 100, 100) == in DEF_TEST()
316 wangs_formula_cubic_reference_impl(kPrecision, worstP)); in DEF_TEST()
317 REPORTER_ASSERT(r, GrWangsFormula::worst_case_cubic_log2(kPrecision, 100, 100) == in DEF_TEST()
318 GrWangsFormula::cubic_log2(kPrecision, worstP)); in DEF_TEST()
322 REPORTER_ASSERT(r, GrWangsFormula::worst_case_cubic(kPrecision, 100, 100) == in DEF_TEST()
323 wangs_formula_cubic_reference_impl(kPrecision, worstP)); in DEF_TEST()
324 REPORTER_ASSERT(r, GrWangsFormula::worst_case_cubic_log2(kPrecision, 100, 100) == in DEF_TEST()
325 GrWangsFormula::cubic_log2(kPrecision, worstP)); in DEF_TEST()
330 float worst = GrWangsFormula::worst_case_cubic(kPrecision, bbox.width(), bbox.height()); in DEF_TEST()
331 int worst_log2 = GrWangsFormula::worst_case_cubic_log2(kPrecision, bbox.width(), in DEF_TEST()
333 float actual = wangs_formula_cubic_reference_impl(kPrecision, pts); in DEF_TEST()
354 std::ceil(wangs_formula_quadratic_reference_impl(kPrecision, pts))); in DEF_TEST()
391 REPORTER_ASSERT(r, d <= (1.f / kPrecision) + SK_ScalarNearlyZero); in DEF_TEST()
404 const float rational_nsegs = wangs_formula_conic_reference_impl(kPrecision, pts, 1.f); in DEF_TEST()
405 const float integral_nsegs = wangs_formula_quadratic_reference_impl(kPrecision, pts); in DEF_TEST()
450 std::ceil(wangs_formula_conic_reference_impl(kPrecision, pts, w))); in DEF_TEST()
468 REPORTER_ASSERT(r, d <= (1.0 / kPrecision) + SK_ScalarNearlyZero); in DEF_TEST()
477 constexpr static float kTolerance = 1.f / kPrecision; in DEF_TEST()
483 const float ref_nsegs = wangs_formula_conic_reference_impl(kPrecision, pts, w); in DEF_TEST()
496 constexpr static float kTolerance = 1.f / kPrecision; in DEF_TEST()