freetype
[Top][All Lists]
Advanced

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

Re: FT Performance Regression?


From: Alexei Podtelezhnikov
Subject: Re: FT Performance Regression?
Date: Sat, 26 Oct 2019 12:53:27 -0400


> 
>> 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?
> 
> Alexei?

Can I have more details on the use case? Is this direct rendering of a small 
outline onto a much larger bitmap without clip_box specified?


reply via email to

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