mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-13 08:22:16 -04:00
Merge branch 'rerender-node' into 'master'
wlr_scene: Add WLR_SCENE_DEBUG_DAMAGE_RENDERER_NODE See merge request wlroots/wlroots!3662
This commit is contained in:
commit
1506d82639
3 changed files with 15 additions and 5 deletions
|
|
@ -57,7 +57,7 @@ wlroots reads these environment variables
|
||||||
|
|
||||||
* *WLR_SCENE_DEBUG_DAMAGE*: specifies debug options for screen damage related
|
* *WLR_SCENE_DEBUG_DAMAGE*: specifies debug options for screen damage related
|
||||||
tasks for compositors that use scenes (available options: none, rerender,
|
tasks for compositors that use scenes (available options: none, rerender,
|
||||||
highlight)
|
rerender_node, highlight)
|
||||||
* *WLR_SCENE_DISABLE_DIRECT_SCANOUT*: disables direct scan-out for debugging.
|
* *WLR_SCENE_DISABLE_DIRECT_SCANOUT*: disables direct scan-out for debugging.
|
||||||
* *WLR_SCENE_DISABLE_VISIBILITY*: If set to 1, the visibility of all scene nodes
|
* *WLR_SCENE_DISABLE_VISIBILITY*: If set to 1, the visibility of all scene nodes
|
||||||
will be considered to be the full node. Intelligent visibility canculations will
|
will be considered to be the full node. Intelligent visibility canculations will
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ struct wlr_scene_node {
|
||||||
enum wlr_scene_debug_damage_option {
|
enum wlr_scene_debug_damage_option {
|
||||||
WLR_SCENE_DEBUG_DAMAGE_NONE,
|
WLR_SCENE_DEBUG_DAMAGE_NONE,
|
||||||
WLR_SCENE_DEBUG_DAMAGE_RERENDER,
|
WLR_SCENE_DEBUG_DAMAGE_RERENDER,
|
||||||
|
WLR_SCENE_DEBUG_DAMAGE_RERENDER_NODE,
|
||||||
WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT
|
WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ struct wlr_scene *wlr_scene_create(void) {
|
||||||
const char *debug_damage_options[] = {
|
const char *debug_damage_options[] = {
|
||||||
"none",
|
"none",
|
||||||
"rerender",
|
"rerender",
|
||||||
|
"rerender_node",
|
||||||
"highlight",
|
"highlight",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
@ -981,14 +982,22 @@ void wlr_scene_buffer_set_buffer_with_options(struct wlr_scene_buffer *scene_buf
|
||||||
}
|
}
|
||||||
|
|
||||||
pixman_region32_t trans_damage;
|
pixman_region32_t trans_damage;
|
||||||
|
|
||||||
|
struct wlr_scene *scene = scene_node_get_root(&scene_buffer->node);
|
||||||
|
if (scene->debug_damage_option == WLR_SCENE_DEBUG_DAMAGE_RERENDER_NODE) {
|
||||||
|
pixman_region32_init_rect(&trans_damage, 0, 0, buffer->width, buffer->height);
|
||||||
|
wlr_region_transform(&trans_damage, &trans_damage,
|
||||||
|
scene_buffer->transform, buffer->width, buffer->height);
|
||||||
|
} else {
|
||||||
pixman_region32_init(&trans_damage);
|
pixman_region32_init(&trans_damage);
|
||||||
wlr_region_transform(&trans_damage, damage,
|
wlr_region_transform(&trans_damage, damage,
|
||||||
scene_buffer->transform, buffer->width, buffer->height);
|
scene_buffer->transform, buffer->width, buffer->height);
|
||||||
|
}
|
||||||
|
|
||||||
pixman_region32_intersect_rect(&trans_damage, &trans_damage,
|
pixman_region32_intersect_rect(&trans_damage, &trans_damage,
|
||||||
box.x, box.y, box.width, box.height);
|
box.x, box.y, box.width, box.height);
|
||||||
pixman_region32_translate(&trans_damage, -box.x, -box.y);
|
pixman_region32_translate(&trans_damage, -box.x, -box.y);
|
||||||
|
|
||||||
struct wlr_scene *scene = scene_node_get_root(&scene_buffer->node);
|
|
||||||
struct wlr_scene_output *scene_output;
|
struct wlr_scene_output *scene_output;
|
||||||
wl_list_for_each(scene_output, &scene->outputs, link) {
|
wl_list_for_each(scene_output, &scene->outputs, link) {
|
||||||
float output_scale = scene_output->output->scale;
|
float output_scale = scene_output->output->scale;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue