RFR: 8211294: ScrollPane content is blurry with 125% scaling
fthevenet at openjdk.java.net
Wed Dec 16 18:16:54 UTC 2020
On Wed, 16 Dec 2020 17:24:10 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>>> Good catch. Yes, `TextFlow` has the same problem, and ought to be fixed as part of this, probably by deleting that method and using the public methods in Region. It seems wholly unnecessary to use the copied method, since the value of `snap` is always set to `isSnapPixel()`, which is what the public methods do.
>> Actually I think the copy was necessary for the other methods in this delimited block: `computeChildXXXAreaWidth/Height` because members from Region are indeed inaccessible.
>> These copies are outdated and should be updated as they use the deprecated `snapSpace()` (instead of `snapSpaceX/Y()`) which does not take into account non square screen ratio.
>> I assume we have no other choice than copy the new versions of these from Region into TextFlow? Unless you think we have reasons to reassess why these where made package-private in the first place ?
> Region is part of the public API, so any change to increase the visibility of fields or methods would require a new enhancement with a CSR and justification as to why it is needed as public API. We wouldn't do that just to fix this bug.
> Does TextFlow really need the package-scope snap methods from Region? I was thinking you would modify the copied `computeChildXXXAreaWidth/Height` methods to call the public `snapSpaceX/Y` methods (the ones that don't take `snap` as a parameter).
Looking the git blame, it appears the orignal and copy diverged on commit 55cf799de20b6fbf9ee31850b75c34389c8a28f2 "Baseline offset depends on layout bounds which are calculated during layout".
I really can't say if TextFlow needs that as well, so I left it out and just adapted the methods as discussed above.
Maybe someone more knowledgeable about font rendering and the TextFlow implementation can comment on whether or not it should be added to TextFlow (presumably in a follow up?)
More information about the openjfx-dev