aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2021-08-30 08:11:18 -0500
committerSimon Ser <contact@emersion.fr>2021-09-02 19:05:02 +0200
commit00c2bae1d3569f76cf318be789679dd50401577c (patch)
treee3a8b52e3399e8b9394b6453137b6b59285ee751
parente2e68ff680698e71c8e4f41812b42fc1b073d6ec (diff)
scene: remove redundant empty-region check in render_texture()
-rw-r--r--types/wlr_scene.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/types/wlr_scene.c b/types/wlr_scene.c
index be568c8e..30faa9f0 100644
--- a/types/wlr_scene.c
+++ b/types/wlr_scene.c
@@ -327,14 +327,14 @@ static void render_texture(struct wlr_output *output,
pixman_region32_init(&damage);
pixman_region32_init_rect(&damage, box->x, box->y, box->width, box->height);
pixman_region32_intersect(&damage, &damage, output_damage);
- if (pixman_region32_not_empty(&damage)) {
- int nrects;
- pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
- for (int i = 0; i < nrects; ++i) {
- scissor_output(output, &rects[i]);
- wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0);
- }
+
+ int nrects;
+ pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
+ for (int i = 0; i < nrects; ++i) {
+ scissor_output(output, &rects[i]);
+ wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0);
}
+
pixman_region32_fini(&damage);
}