mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-11-27 06:59:54 -05:00
output: add damage tracking methods
This commit is contained in:
parent
9b1641aa14
commit
79b81263f4
2 changed files with 21 additions and 1 deletions
|
|
@ -30,6 +30,24 @@
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
cage_output_damage_whole(struct cg_output *output)
|
||||||
|
{
|
||||||
|
assert(output != NULL);
|
||||||
|
|
||||||
|
wlr_output_damage_add_whole(output->damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cage_output_damage_region(struct cg_output *output, struct wlr_box *region)
|
||||||
|
{
|
||||||
|
assert(output != NULL);
|
||||||
|
assert(region != NULL);
|
||||||
|
assert(output->wlr_output->enabled);
|
||||||
|
|
||||||
|
wlr_output_damage_add_box(output->damage, region);
|
||||||
|
}
|
||||||
|
|
||||||
struct send_frame_done_data {
|
struct send_frame_done_data {
|
||||||
struct timespec when;
|
struct timespec when;
|
||||||
};
|
};
|
||||||
|
|
@ -184,7 +202,7 @@ cage_output_enable(struct cg_output *output)
|
||||||
|
|
||||||
wlr_output_enable(wlr_output, true);
|
wlr_output_enable(wlr_output, true);
|
||||||
wlr_output_commit(wlr_output);
|
wlr_output_commit(wlr_output);
|
||||||
wlr_output_damage_add_whole(output->damage);
|
cage_output_damage_whole(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ struct cg_output {
|
||||||
struct wl_list link; // cg_server::outputs
|
struct wl_list link; // cg_server::outputs
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void cage_output_damage_whole(struct cg_output *output);
|
||||||
|
void cage_output_damage_region(struct cg_output *output, struct wlr_box *region);
|
||||||
void cage_output_get_geometry(struct cg_output *output, struct wlr_box *geometry);
|
void cage_output_get_geometry(struct cg_output *output, struct wlr_box *geometry);
|
||||||
void cage_output_disable(struct cg_output *output);
|
void cage_output_disable(struct cg_output *output);
|
||||||
void cage_output_enable(struct cg_output *output);
|
void cage_output_enable(struct cg_output *output);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue