Change repaint_needed to bool

It is only used as a binary value.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Daniel Stone 8 years ago committed by Pekka Paalanen
parent 3615ce1955
commit 09a97e2402
  1. 2
      libweston/compositor-drm.c
  2. 2
      libweston/compositor-fbdev.c
  3. 4
      libweston/compositor.c
  4. 5
      libweston/compositor.h

@ -2995,7 +2995,7 @@ session_notify(struct wl_listener *listener, void *data)
* pending frame callbacks. */
wl_list_for_each(output, &compositor->output_list, base.link) {
output->base.repaint_needed = 0;
output->base.repaint_needed = false;
drmModeSetCursor(b->drm.fd, output->crtc_id, 0, 0, 0);
}

@ -693,7 +693,7 @@ session_notify(struct wl_listener *listener, void *data)
wl_list_for_each(output,
&compositor->output_list, link) {
output->repaint_needed = 0;
output->repaint_needed = false;
}
}
}

@ -2310,7 +2310,7 @@ weston_output_repaint(struct weston_output *output)
pixman_region32_fini(&output_damage);
output->repaint_needed = 0;
output->repaint_needed = false;
weston_compositor_repick(ec);
@ -2549,7 +2549,7 @@ weston_output_schedule_repaint(struct weston_output *output)
TL_POINT("core_repaint_req", TLP_OUTPUT(output), TLP_END);
loop = wl_display_get_event_loop(compositor->wl_display);
output->repaint_needed = 1;
output->repaint_needed = true;
if (output->repaint_scheduled)
return;

@ -170,7 +170,10 @@ struct weston_output {
pixman_region32_t region;
pixman_region32_t previous_damage;
int repaint_needed;
/** True if damage has occurred since the last repaint for this output;
* if set, a repaint will eventually occur. */
bool repaint_needed;
int repaint_scheduled;
struct wl_event_source *repaint_timer;
struct weston_output_zoom zoom;

Loading…
Cancel
Save