[PATCH 5/5] d2d1: Implement initial support for quadratic bezier outlines.

Dmitry Timoshkov dmitry at baikal.ru
Sun May 21 11:23:49 CDT 2017


Henri Verbeet <hverbeet at codeweavers.com> wrote:

> +static void d2d_point_lerp(D2D1_POINT_2F *out,
> +        const D2D1_POINT_2F *a, const D2D1_POINT_2F *b, float t)
> +{
> +    out->x = a->x * (1.0f - t) + b->x * t;
> +    out->y = a->y * (1.0f - t) + b->y * t;
> +}

According to my investigation of a better bilinear blending (lerp)
implementation the above formula is better to explicitely simplify
to

out->x = a->x + (b->x - a->x) * t;
out->y = a->y + (b->y - a->y) * t;

or even better to avoid floating point operations at all by replacing
them either by fixed point math or a mmx/sse helper, which is able
to considerably (x10) improve performance.

-- 
Dmitry.



More information about the wine-devel mailing list