freetype
[Top][All Lists]
Advanced

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

Re: FT Performance Regression?


From: Jamie Dale
Subject: Re: FT Performance Regression?
Date: Fri, 25 Oct 2019 17:57:16 +0100

Right, I think I've found the issue.

FreeType 2.6 used to use an unbounded clip_box in the FT_Raster_Params
struct, and internally the gray_compute_cbox function would clamp it to a
reasonable range.

That clamping no longer happens, so you have to do it yourself before
calling the function. The docs don't really explain how that would be
calculated, but from looking at the old 2.6 code I think it should be this:

FT_Outline_Get_CBox(outline, &rp.clip_box);
rp.clip_box.xMin = rp.clip_box.xMin >> 6;
rp.clip_box.yMin = rp.clip_box.yMin >> 6;
rp.clip_box.xMax = (rp.clip_box.xMax + 63) >> 6;
rp.clip_box.yMax = (rp.clip_box.yMax + 63) >> 6;

Does that seem correct?

-Jamie.

On Fri, 25 Oct 2019 at 15:35, Jamie Dale <address@hidden>
wrote:

> Further investigation shows that gray_convert_glyph_inner is now being
> called hundreds of times, whereas in 2.6 it was called once.
>
> -Jamie.
>
> On Thu, 24 Oct 2019, 15:28 Jamie Dale, <address@hidden>
> wrote:
>
>> Okay, it's FT_Outline_Render that's gotten slower.
>>
>> Our code is using the same set-up as RenderSpans in this example:
>> https://www.freetype.org/freetype2/docs/tutorial/example2.cpp
>>
>> -Jamie.
>>
>> On Thu, 24 Oct 2019, 14:59 Jamie Dale, <address@hidden>
>> wrote:
>>
>>> Scratch that, it seems to be something in the FT_Stroker API that's
>>> gotten slower.
>>>
>>> We're continuing to investigate, but let me know if you have any leads.
>>>
>>> -Jamie.
>>>
>>> On Thu, 24 Oct 2019, 13:04 Jamie Dale, <address@hidden>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> We recently upgraded from FreeType 2.6 to 2.10, and are finding that
>>>> with identical code, things are now running significantly slower
>>>> (FT_RenderGlyph seems to be 10x slower).
>>>>
>>>> I tried changing the "interpreter-version" to both 35 and 40 but it
>>>> made no difference.
>>>>
>>>> Is there anything else we need to disable or change in order to get the
>>>> old performance back?
>>>>
>>>> Thanks,
>>>> Jamie.
>>>>
>>>


reply via email to

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