diff options
| author | Simon Ser <contact@emersion.fr> | 2020-11-26 11:06:37 +0100 | 
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2020-12-13 12:16:28 +0100 | 
| commit | 768131e4883ed8b04ced6b453721fc28dbf61577 (patch) | |
| tree | 1d086a2138a4a79cfaddb3af5e14f651a733ed74 | |
| parent | 4c363a564f7ce1ef722417e8b8a0607c1004c828 (diff) | |
| download | wlroots-768131e4883ed8b04ced6b453721fc28dbf61577.tar.xz | |
output: stop assuming a frame is pending in init
- The DRM backend initially doesn't have a frame scheduled initially.
  However the compositor is expected to set a mode to start the
  rendering loop (frame_pending is set to true in drm_crtc_pageflip).
- The headless and X11 backends have a timer to schedule frames, so they
  ignore this hint completely.
- The Wayland backend renders a fake frame to start the rendering loop.
  It's the only case where a frame is pending on init, move the
  assumption there.
| -rw-r--r-- | backend/wayland/output.c | 1 | ||||
| -rw-r--r-- | types/wlr_output.c | 2 | 
2 files changed, 1 insertions, 2 deletions
| diff --git a/backend/wayland/output.c b/backend/wayland/output.c index abe8e43e..87b06808 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -582,6 +582,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {  			NULL)) {  		goto error;  	} +	wlr_output->frame_pending = true;  	wl_list_insert(&backend->outputs, &output->link);  	wlr_output_update_enabled(wlr_output, true); diff --git a/types/wlr_output.c b/types/wlr_output.c index 2397985b..8dbdfdfb 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -358,8 +358,6 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,  	output->display_destroy.notify = handle_display_destroy;  	wl_display_add_destroy_listener(display, &output->display_destroy); - -	output->frame_pending = true;  }  void wlr_output_destroy(struct wlr_output *output) { | 
