mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-14 04:28:22 -05:00
render/pass: accept fractional destination coordinates
Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
parent
91c08d5a53
commit
5a49f2ae14
13 changed files with 79 additions and 47 deletions
|
|
@ -46,9 +46,9 @@ void wlr_render_texture_options_get_src_box(const struct wlr_render_texture_opti
|
|||
}
|
||||
|
||||
void wlr_render_texture_options_get_dst_box(const struct wlr_render_texture_options *options,
|
||||
struct wlr_box *box) {
|
||||
struct wlr_fbox *box) {
|
||||
*box = options->dst_box;
|
||||
if (wlr_box_empty(box)) {
|
||||
if (wlr_fbox_empty(box)) {
|
||||
box->width = options->texture->width;
|
||||
box->height = options->texture->height;
|
||||
}
|
||||
|
|
@ -62,9 +62,9 @@ float wlr_render_texture_options_get_alpha(const struct wlr_render_texture_optio
|
|||
}
|
||||
|
||||
void wlr_render_rect_options_get_box(const struct wlr_render_rect_options *options,
|
||||
const struct wlr_buffer *buffer, struct wlr_box *box) {
|
||||
if (wlr_box_empty(&options->box)) {
|
||||
*box = (struct wlr_box){
|
||||
const struct wlr_buffer *buffer, struct wlr_fbox *box) {
|
||||
if (wlr_fbox_empty(&options->box)) {
|
||||
*box = (struct wlr_fbox){
|
||||
.width = buffer->width,
|
||||
.height = buffer->height,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue