output: add wlr_output_schedule_frame

This commit is contained in:
emersion 2018-01-26 22:39:23 +01:00
parent ece2c1e4e2
commit 8d58ed502b
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
9 changed files with 41 additions and 31 deletions

View file

@ -23,7 +23,6 @@ struct roots_output {
struct timespec last_frame;
pixman_region32_t damage; // in ouput-local coordinates
bool frame_pending;
// circular queue for previous damage
pixman_region32_t previous_damage[ROOTS_OUTPUT_PREVIOUS_DAMAGE_LEN];

View file

@ -33,5 +33,6 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
int32_t height, int32_t refresh);
void wlr_output_update_enabled(struct wlr_output *output, bool enabled);
void wlr_output_update_needs_swap(struct wlr_output *output);
void wlr_output_send_frame(struct wlr_output *output);
#endif

View file

@ -63,6 +63,7 @@ struct wlr_output {
bool needs_swap;
// damage for cursors and fullscreen surface, in output-local coordinates
pixman_region32_t damage;
bool frame_pending;
float transform_matrix[16];
struct {
@ -123,6 +124,11 @@ bool wlr_output_make_current(struct wlr_output *output, int *buffer_age);
*/
bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when,
pixman_region32_t *damage);
/**
* Manually schedules a `frame` event. If a `frame` event is already pending,
* it is a no-op.
*/
void wlr_output_schedule_frame(struct wlr_output *output);
void wlr_output_set_gamma(struct wlr_output *output,
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b);
uint32_t wlr_output_get_gamma_size(struct wlr_output *output);