RFR: 8320359: ImageView: add styleable fitWidth, fitHeight, preserveRatio, smooth properties [v3]
John Hendrikx
jhendrikx at openjdk.org
Thu Nov 30 23:05:19 UTC 2023
On Thu, 30 Nov 2023 19:03:38 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Adding missing styleable properties to ImageView:
>>
>>
>> -fx-preserve-ratio
>> -fx-smooth
>> -fx-fit-width
>> -fx-fit-height
>>
>>
>> Updated CSS Reference.
>
> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>
> save 8 bytes
modules/javafx.graphics/src/main/java/com/sun/javafx/css/CssUtil.java line 75:
> 73:
> 74: /** immutable list with random access backed by an array */
> 75: private static class ImmutableArrayList<T> extends AbstractList<T> implements RandomAccess {
I'd like to point that a skeletal implementation of `AbstractList` will perform worse than `ArrayList` for any method that needs to walk the list, as the `AbstractList` will use iterators for methods like `indexOf`, `hashCode` and `equals`. Now that will probably be irrelevant, but as this seems to be a micro optimization, you should be aware of all the trade offs.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1293#discussion_r1411392604
More information about the openjfx-dev
mailing list