mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
perf: boost the game's busiest threads onto the prime cores on the Odin 3 (#682)
This commit is contained in:
1 parent
679e3d8934
commit
78429c93a8
5 files changed
+255
No files matched your search
@@ -45,6 +45,10 @@ public final class WaylandCompositor {
|
||||
|
||||
private static volatile long lastFrameNanos;
|
||||
private static volatile long frameIntervalNanos;
|
||||
private static volatile long gameFrames; // written by the compositor thread only
|
||||
|
||||
/** Frames the game has presented since the app started; the rate is the difference over time. */
|
||||
public static long gameFrameCount() { return gameFrames; }
|
||||
|
||||
public static long recentFrameIntervalMs() {
|
||||
long last = lastFrameNanos;
|
||||
@@ -57,6 +61,7 @@ public final class WaylandCompositor {
|
||||
long now = System.nanoTime();
|
||||
long previous = lastFrameNanos;
|
||||
lastFrameNanos = now;
|
||||
gameFrames++;
|
||||
if (previous != 0) {
|
||||
long interval = now - previous;
|
||||
long smoothed = frameIntervalNanos;
|
||||
|
||||
Reference in new issue
Block a user