1
0
Fork 0

clutter: Pass ClutterFrameHint(s) to the frame clock

(cherry picked from commit 5fa0c83a5fd5267f1c5e91c34dc3b91d6177105b)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441>
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
This commit is contained in:
Daniel van Vugt 2021-09-07 19:15:18 +08:00 committed by Mingi Sung
parent efe8da4dd1
commit 06d2bca831
Signed by: sungmg
GPG key ID: 41BAFD6FFD8036C5
3 changed files with 11 additions and 6 deletions

View file

@ -86,6 +86,7 @@ typedef struct _Frame
int64_t flip_time_us;
int64_t dispatch_interval_us;
ClutterFrameInfoFlag presentation_flags;
ClutterFrameHint hints;
gboolean has_next_presentation_time;
gboolean got_measurements;
} Frame;
@ -1228,12 +1229,14 @@ frame_clock_source_dispatch (GSource *source,
}
void
clutter_frame_clock_record_flip_time (ClutterFrameClock *frame_clock,
int64_t flip_time_us)
clutter_frame_clock_record_flip (ClutterFrameClock *frame_clock,
int64_t flip_time_us,
ClutterFrameHint hints)
{
Frame *new_frame = frame_clock->prev_dispatch;
new_frame->flip_time_us = flip_time_us;
new_frame->hints = hints;
}
GString *

View file

@ -108,8 +108,9 @@ void clutter_frame_clock_remove_timeline (ClutterFrameClock *frame_clock,
CLUTTER_EXPORT
float clutter_frame_clock_get_refresh_rate (ClutterFrameClock *frame_clock);
void clutter_frame_clock_record_flip_time (ClutterFrameClock *frame_clock,
int64_t flip_time_us);
void clutter_frame_clock_record_flip (ClutterFrameClock *frame_clock,
int64_t flip_time_us,
ClutterFrameHint hints);
GString * clutter_frame_clock_get_max_render_time_debug_info (ClutterFrameClock *frame_clock);

View file

@ -1075,8 +1075,9 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
_clutter_stage_window_redraw_view (stage_window, view, frame);
clutter_frame_clock_record_flip_time (frame_clock,
g_get_monotonic_time ());
clutter_frame_clock_record_flip (frame_clock,
g_get_monotonic_time (),
clutter_frame_get_hints (frame));
clutter_stage_emit_after_paint (stage, view, frame);