The reason for removal is that this is a dangerous method to call. In order ...
12 years, 8 months ago
(2012-02-14 21:23:01 UTC)
#1
The reason for removal is that this is a dangerous method to call. In order for
the return value to be useful, the caller must already hold a lock on whatever
backs the font lookup. It would be better to simply call other functions and
check their return values.
This static function has only one user, SkScalerContext_FreeType::setupSize.
This use appears to be unneeded, since the check there should never return
false. Even if it did, it seems dubious not to render the glyph seeing that
there is a live accessible scalar context currently being called.
The only protection provided by such a check is if the memory backing the
FreeType face had been freed. This does not appear to be possible at this point
since, in order to have called into this function, the user needs to already
have a live reference to the SkTypeface in question.
The only additional known modification which would need to be made is to remove
SkFontHost::ValidFontID from chrome\src\skia\ext\SkFontHost_fontconfig.cpp
I suggest we post a CL for review that removes that function from SkFontHost_fontconfig.cpp now, ...
12 years, 8 months ago
(2012-02-15 13:06:42 UTC)
#3
I suggest we post a CL for review that removes that function from
SkFontHost_fontconfig.cpp now, just in case a reviewer discovers some good
reason to keep it. We wouldn't commit that (obviously) until the skia change
landed.
On 2012/02/15 13:06:42, reed1 wrote: > I suggest we post a CL for review that ...
12 years, 8 months ago
(2012-02-15 17:00:12 UTC)
#4
On 2012/02/15 13:06:42, reed1 wrote:
> I suggest we post a CL for review that removes that function from
> SkFontHost_fontconfig.cpp now, just in case a reviewer discovers some good
> reason to keep it. We wouldn't commit that (obviously) until the skia change
> landed.
Chromium CL http://codereview.chromium.org/9347043/ created.
Issue 5654055: Remove SkFontHost::ValidFontID
(Closed)
Created 12 years, 9 months ago by bungeman
Modified 12 years, 8 months ago
Reviewers: reed1, DerekS
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 0