diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-05 11:35:35 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-05 11:37:23 -0400 |
commit | 81fd9741fff111f2347ebac546a090a9ef5f974a (patch) | |
tree | 2cf05f0ac9c559a092c04f2c9710a2a15f2e9928 /gsk | |
parent | ce6569d1a670a9b2ae03d72c2f22cd9019cf38a6 (diff) | |
download | gtk+-81fd9741fff111f2347ebac546a090a9ef5f974a.tar.gz |
gsk: Better handling of offscreens
Take the scale into account for sizing the
offscreens for masks, blends and cross-fades.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderjob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index dc1be07d98..25943c3fe1 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -2824,7 +2824,7 @@ gsk_gl_render_job_visit_cross_fade_node (GskGLRenderJob *job, offscreen_end.reset_clip = TRUE; offscreen_end.bounds = &node->bounds; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); if (!gsk_gl_render_job_visit_node_with_offscreen (job, start_node, &offscreen_start)) { @@ -3243,7 +3243,7 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job, bottom_offscreen.force_offscreen = TRUE; bottom_offscreen.reset_clip = TRUE; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); /* TODO: We create 2 textures here as big as the blend node, but both the * start and the end node might be a lot smaller than that. */ @@ -3312,7 +3312,7 @@ gsk_gl_render_job_visit_mask_node (GskGLRenderJob *job, mask_offscreen.reset_clip = TRUE; mask_offscreen.do_not_cache = TRUE; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); /* TODO: We create 2 textures here as big as the mask node, but both * nodes might be a lot smaller than that. |