On Fri, 22 May 2026 17:12:28 GMT, Andy Goryachev <[email protected]> wrote:

>> modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java line 298:
>> 
>>> 296:      * @implNote To save CPU cycles, animations are not done for 
>>> embedded
>>> 297:      */
>>> 298:     public static boolean isDoAnimations() {
>> 
>> I think we shouldn't hard-code behavior for different platforms, especially 
>> since the assumption that **all** embedded platforms are totally unable to 
>> show animations is flawed at best. There are powerful embedded systems.
>> 
>> We've had `Scene.Preferences.reducedMotion` for quite some time now, so we 
>> should make animations depend on that preference instead. For backwards 
>> compatibility, we could make `Platform.Preferences.reducedMotion` default to 
>> `true` on embedded platforms.
>
> I think it should be ok for this PR (corresponds to the status quo), but you 
> do bring a good point: `isEmbedded()` is extremely vague - is it referring to 
> a 8085 kind of embedded or embedded linux on 2 GHz arm chip?  
> 
> And what does it mean, exactly?  There are a few places that use it 
> currently, like sub-pixel (LCD) font rendering, some caching in 
> `TitledPaneSkin`, texture mapping in Phong material, etc.
> 
> Perhaps instead we should consider splitting it into individual features like 
> `low power`, `resource constrained`, `reduced graphic quality` and the like.
> 
> What do you think?

Agree. I initially wanted to add a System Property instead - but decided 
against because I want to keep the behavior for now.

But I'm definitely in favor of a better method.

Regarding `Platform.Preferences.reducedMotion`, this seems like a good 
candidate here and also `Pagination` prev/next Animation - maybe the 
`TitledPane` `animated` property default and some more. 
+1 from me.

I think this would not solve all cases though, as Andy mentioned there are some 
other locations where `reducedMotion` makes not that much sense probably, but 
instead something like `reduced graphic quality` or similar.

How about I create a ticket, and the two of you add any details I haven't 
covered - so we have a well-documented ticket? Then I can send an email and see 
what kind of feedback we get.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2146#discussion_r3294703639

Reply via email to