mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/pixman: apply source image cropping
This commit is contained in:
parent
123a08b448
commit
9fefeb69d6
1 changed files with 5 additions and 4 deletions
|
@ -260,10 +260,11 @@ static bool pixman_render_subtexture_with_matrix(
|
||||||
|
|
||||||
pixman_image_set_transform(texture->image, &transform);
|
pixman_image_set_transform(texture->image, &transform);
|
||||||
|
|
||||||
// TODO clip properly with src_x and src_y
|
double x = fbox->x * m[0] + fbox->y * m[1] + 1.0 * m[6];
|
||||||
pixman_image_composite32(PIXMAN_OP_OVER, texture->image, mask,
|
double y = fbox->x * m[3] + fbox->y * m[4] + 1.0 * m[7];
|
||||||
buffer->image, 0, 0, 0, 0, 0, 0, renderer->width,
|
|
||||||
renderer->height);
|
pixman_image_composite32(PIXMAN_OP_OVER, texture->image, mask, buffer->image,
|
||||||
|
x, y, 0, 0, 0, 0, renderer->width, renderer->height);
|
||||||
|
|
||||||
if (texture->buffer != NULL) {
|
if (texture->buffer != NULL) {
|
||||||
wlr_buffer_end_data_ptr_access(texture->buffer);
|
wlr_buffer_end_data_ptr_access(texture->buffer);
|
||||||
|
|
Loading…
Reference in a new issue