mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
scene: constify region APIs
This commit is contained in:
parent
c5d79bfb26
commit
2b22a10478
2 changed files with 4 additions and 4 deletions
|
@ -338,14 +338,14 @@ void wlr_scene_buffer_set_buffer(struct wlr_scene_buffer *scene_buffer,
|
||||||
* the whole buffer node will be damaged.
|
* the whole buffer node will be damaged.
|
||||||
*/
|
*/
|
||||||
void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buffer,
|
void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buffer,
|
||||||
struct wlr_buffer *buffer, pixman_region32_t *region);
|
struct wlr_buffer *buffer, const pixman_region32_t *region);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the buffer's opaque region. This is an optimization hint used to
|
* Sets the buffer's opaque region. This is an optimization hint used to
|
||||||
* determine if buffers which reside under this one need to be rendered or not.
|
* determine if buffers which reside under this one need to be rendered or not.
|
||||||
*/
|
*/
|
||||||
void wlr_scene_buffer_set_opaque_region(struct wlr_scene_buffer *scene_buffer,
|
void wlr_scene_buffer_set_opaque_region(struct wlr_scene_buffer *scene_buffer,
|
||||||
pixman_region32_t *region);
|
const pixman_region32_t *region);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the source rectangle describing the region of the buffer which will be
|
* Set the source rectangle describing the region of the buffer which will be
|
||||||
|
|
|
@ -560,7 +560,7 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_tree *parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buffer,
|
void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buffer,
|
||||||
struct wlr_buffer *buffer, pixman_region32_t *damage) {
|
struct wlr_buffer *buffer, const pixman_region32_t *damage) {
|
||||||
// specifying a region for a NULL buffer doesn't make sense. We need to know
|
// specifying a region for a NULL buffer doesn't make sense. We need to know
|
||||||
// about the buffer to scale the buffer local coordinates down to scene
|
// about the buffer to scale the buffer local coordinates down to scene
|
||||||
// coordinates.
|
// coordinates.
|
||||||
|
@ -682,7 +682,7 @@ void wlr_scene_buffer_set_buffer(struct wlr_scene_buffer *scene_buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_scene_buffer_set_opaque_region(struct wlr_scene_buffer *scene_buffer,
|
void wlr_scene_buffer_set_opaque_region(struct wlr_scene_buffer *scene_buffer,
|
||||||
pixman_region32_t *region) {
|
const pixman_region32_t *region) {
|
||||||
if (pixman_region32_equal(&scene_buffer->opaque_region, region)) {
|
if (pixman_region32_equal(&scene_buffer->opaque_region, region)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue