freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Alexei Podtelezhnikov
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Mon, 15 Jun 2020 09:56:06 -0400

On Mon, Jun 15, 2020 at 9:06 AM Anuj Verma <anujv@iitbhilai.ac.in> wrote:
>
> > Your profiling results indicate that a lot of time is spent
> > calculating distances. Perhaps, you can work with much faster
> > square-distances (they can be signed or signs stored separately) and
> > apply square root as a final processing step. Or, would signed
> > square-distance field work as well (SSDF so to speak)? Please spend
> > some time thinking about optimizations and bottlenecks.
>
> Yes, even I was thinking of reducing the number of calls to 
> `ft_trig_pseudo_polarize'
> which I believe is called through `FT_Vector_Length'. Working with squared 
> distances
> can definitely be a good option, it will cut the total time by almost 50%.

For linear segments, it will save more than 90% according to your
table. Then you will see that splitting Bezier curves is not such a
bad option. In general, Bezier curves are used in graphics because it
is easy to split and flatten them. I would be very surprised if
distance fields were different in this regard?

Alexei



reply via email to

[Prev in Thread] Current Thread [Next in Thread]