mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/pass: Ensure the precision is consistent during comparison
This commit is contained in:
parent
af43d3b9e7
commit
a08acfcee0
1 changed files with 2 additions and 2 deletions
|
|
@ -21,8 +21,8 @@ void wlr_render_pass_add_texture(struct wlr_render_pass *render_pass,
|
||||||
if (!wlr_fbox_empty(&options->src_box)) {
|
if (!wlr_fbox_empty(&options->src_box)) {
|
||||||
const struct wlr_fbox *box = &options->src_box;
|
const struct wlr_fbox *box = &options->src_box;
|
||||||
assert(box->x >= 0 && box->y >= 0 &&
|
assert(box->x >= 0 && box->y >= 0 &&
|
||||||
box->x + box->width <= options->texture->width &&
|
(uint32_t)(box->x + box->width) <= options->texture->width &&
|
||||||
box->y + box->height <= options->texture->height);
|
(uint32_t)(box->y + box->height) <= options->texture->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
render_pass->impl->add_texture(render_pass, options);
|
render_pass->impl->add_texture(render_pass, options);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue