aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-15 06:03:54 -0400
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-15 06:14:59 -0400
commitbcf7a793575ead7a8e68401d5b5808d5337ebfe1 (patch)
treeff8ae908e39973d43eb7b172923fc9745e96bda0
parent1d08ef234e6fcb6cdd2ca128f0259497aaaaddf8 (diff)
wlr_scene: Use wlr_fbox_equals
-rw-r--r--types/scene/wlr_scene.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index 9e68e6cd..b2e7d71a 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -686,7 +686,7 @@ void wlr_scene_buffer_set_source_box(struct wlr_scene_buffer *scene_buffer,
const struct wlr_fbox *box) {
struct wlr_fbox *cur = &scene_buffer->src_box;
if ((wlr_fbox_empty(box) && wlr_fbox_empty(cur)) ||
- (box != NULL && memcmp(cur, box, sizeof(*box)) == 0)) {
+ (box != NULL && wlr_fbox_equal(cur, box))) {
return;
}
@@ -1417,7 +1417,7 @@ static bool scene_node_try_direct_scanout(struct wlr_scene_node *node,
}
if (!wlr_fbox_empty(&buffer->src_box) &&
- memcmp(&buffer->src_box, &default_box, sizeof(default_box)) != 0) {
+ !wlr_fbox_equal(&buffer->src_box, &default_box)) {
return false;
}