freetype-devel
[Top][All Lists]
Advanced

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

Re: Update on OT-SVG in FreeType


From: Werner LEMBERG
Subject: Re: Update on OT-SVG in FreeType
Date: Tue, 03 Aug 2021 18:32:15 +0000 (UTC)

>> I had a quick look at the code, and I've immediately found a
>> fundamental problem: You are directly accessing
>> `library->svg_renderer_state`.  This is a no-go for applications
>> since `FT_Library` is an opaque pointer that must not be
>> dereferenced.
>>
>> Is it actually necessary that `svg_renderer_state` is a member of
>> `FT_Library`?  Your SVG code doesn't access it.  If yes, we
>> probably need a driver property to pass the SVG renderer state
>> structure back and forth.
> 
> Basically, I use that location to store a structure that keeps some
> caching data that the one hook writes to while the other one reads
> from.  This avoids computing the same thing again.

OK, but...

> It's not really necessary to store it in FT_Library, if there's any
> other location that all the hooks can access, it'd work fine. Do you
> have other candidates to store the structure?

...why must this be in FreeType at all?  It's user data, so what about
letting the application store this?  All hooks are in user space,
right?


    Werner



reply via email to

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