mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter/frame-info: Add VSYNC flag
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484>
This commit is contained in:
parent
47183a94eb
commit
02d7fca716
@ -127,6 +127,14 @@ typedef enum
|
||||
* fullscreen surface and a surface on a hardware overlay.
|
||||
*/
|
||||
CLUTTER_FRAME_INFO_FLAG_ZERO_COPY = 1 << 1,
|
||||
/*
|
||||
* The presentation was synchronized to the "vertical retrace" by the display
|
||||
* hardware such that tearing does not happen. Relying on user space
|
||||
* scheduling is not acceptable for this flag. If presentation is done by a
|
||||
* copy to the active frontbuffer, then it must guarantee that tearing cannot
|
||||
* happen.
|
||||
*/
|
||||
CLUTTER_FRAME_INFO_FLAG_VSYNC = 1 << 2,
|
||||
} ClutterFrameInfoFlag;
|
||||
|
||||
/**
|
||||
|
@ -835,6 +835,9 @@ frame_cb (CoglOnscreen *onscreen,
|
||||
if (cogl_frame_info_is_zero_copy (frame_info))
|
||||
flags |= CLUTTER_FRAME_INFO_FLAG_ZERO_COPY;
|
||||
|
||||
if (cogl_frame_info_is_vsync (frame_info))
|
||||
flags |= CLUTTER_FRAME_INFO_FLAG_VSYNC;
|
||||
|
||||
clutter_frame_info = (ClutterFrameInfo) {
|
||||
.frame_counter = cogl_frame_info_get_global_frame_counter (frame_info),
|
||||
.refresh_rate = cogl_frame_info_get_refresh_rate (frame_info),
|
||||
|
Loading…
Reference in New Issue
Block a user