On Fri, 31 Jan 2025 12:37:04 GMT, Lukasz Kostyra <lkost...@openjdk.org> wrote:
> This is a cleanup follow-up, removing `FontFileWriter.FontTracker` and all > related uses. `FontTracker` was tracking font size use when SecurityManager > was present, however since we removed SM, `FontTracker` was no longer > activated and as such was dead code. > > `FontFileWriter.FontTracker` and its use in `FontFileWriter` + related > methods were removed. This in turn cleaned up `PrismFontFile` and made a > couple of variables not longer used, including a `bool tracking` argument in > constructor. These cleanups propagated to `PrismFontFactory`, > `{CT,DW,FT}Factory` and `{CT,DW,FT}FontFile` classes. > > Tests worked the same after this change. Looks good with one minor thing I noticed. I greped for `tracker` in the font code after applying your patch, and see a comment that says "and decrement the byte count in the tracker object" in `PrismFontFactory.java`: 1405 } finally { 1406 /* If the data isn't a valid font, so that registering it 1407 * returns null, or we didn't get so far as copying the data, 1408 * delete the tmp file and decrement the byte count 1409 * in the tracker object before returning. 1410 */ I'll reapprove if you fix it. ------------- Marked as reviewed by kcr (Lead). PR Review: https://git.openjdk.org/jfx/pull/1693#pullrequestreview-2587304618