mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
scene: use output with highest refresh rate for frame pacing
If a surface is mirrored on two outputs, we don't want to pick the first output if the second has a higher refresh rate. Also fixes duplicate frame/feedback events when a surface is added to multiple scenes.
This commit is contained in:
parent
51d051497d
commit
6204fc3278
2 changed files with 24 additions and 7 deletions
|
|
@ -123,6 +123,10 @@ struct wlr_scene_surface {
|
|||
struct {
|
||||
struct wlr_box clip;
|
||||
|
||||
// Output used for frame pacing (surface frame callbacks, presentation
|
||||
// time feedback, etc), may be NULL
|
||||
struct wlr_output *frame_pacing_output;
|
||||
|
||||
struct wlr_addon addon;
|
||||
|
||||
struct wl_listener outputs_update;
|
||||
|
|
@ -178,8 +182,7 @@ struct wlr_scene_buffer {
|
|||
/**
|
||||
* The output that the largest area of this buffer is displayed on.
|
||||
* This may be NULL if the buffer is not currently displayed on any
|
||||
* outputs. This is the output that should be used for frame callbacks,
|
||||
* presentation feedback, etc.
|
||||
* outputs.
|
||||
*/
|
||||
struct wlr_scene_output *primary_output;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue