AnimationTimer and actual frame rate

Markus KARG markus at headcrashing.eu
Fri Dec 23 08:15:00 UTC 2016


AnimationTimer is fired once per "planned" frame (i. e. running at maximum possible FPS), not per "actually rendered" frame. JavaFX contains a lot of optimizations. For example, a boolean property animated over time to switch from false to true will only imply a single modification, hence only one frame is actually rendered.
-Markus

-----Original Message-----
From: openjfx-dev [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Michael Paus
Sent: Donnerstag, 22. Dezember 2016 17:29
To: openjfx-dev at openjdk.java.net
Subject: AnimationTimer and actual frame rate

Hi all,

for quite a while now I am observing a strange behavior when running some

JavaFX graphics tests. The scenario is very simple. I am running some animation

which puts some load onto the graphics engine and I am trying to measure the

frame rate via an instance of an AnimationTimer. When I increase the load high

enough I reach a point where the indicated frame rate is just 60FPS or even a bit

lower but the observed frame rate on screen has already dropped to something

like 1-2 FPS. So what I observe is that the AnimationTimer is running much faster

than the updates of the graphics. How can that be? Does anybody have an explanation

under which circumstances this can happen? Or is this behavior a bug which I should report?

Just some puzzle for the boring Christmas holidays :-)

Merry Christmas to all of you

Michael

PS: My system is a MacBook Pro with NVidia graphic card.




More information about the openjfx-dev mailing list