summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2020-10-15 21:04:51 -0700
committerChristian Hergert <chergert@redhat.com>2020-10-15 21:04:51 -0700
commit7ae8ed82c9ce2656e0301b1d5161c683695b0c00 (patch)
tree03845602a0afa4381e18976fb804f9ab2769f987
parent1021e121219eacfa5017baf6d6952a90f1903a65 (diff)
downloadgtk+-wip/chergert/fix-macos-fps-calculation.tar.gz
macos: fix fps calculation for frame timingswip/chergert/fix-macos-fps-calculation
We need to mark the timings as complete after adding the presentation time so that we have a valid FPS for the overlay widget and/or fishbowl demo.
-rw-r--r--gdk/macos/gdkmacossurface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index ec0fb41560..9925407d46 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -713,7 +713,10 @@ _gdk_macos_surface_thaw (GdkMacosSurface *self,
timings = gdk_frame_clock_get_timings (frame_clock, self->pending_frame_counter);
if (timings != NULL)
- timings->presentation_time = presentation_time - refresh_interval;
+ {
+ timings->presentation_time = presentation_time - refresh_interval;
+ timings->complete = TRUE;
+ }
self->pending_frame_counter = 0;
}