Skip to content

Commit

Permalink
backend: skip blits with 0 opacity
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Aug 12, 2024
1 parent e6a3284 commit b2ee83c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ bool backend_execute(struct backend_base *backend, image_handle target, unsigned
if (!pixman_region32_not_empty(cmd->blit.target_mask)) {
continue;
}
if (cmd->blit.opacity < 1. / MAX_ALPHA) {
continue;
}
succeeded =
backend->ops.blit(backend, cmd->origin, target, &cmd->blit);
break;
Expand Down

0 comments on commit b2ee83c

Please sign in to comment.