summaryrefslogtreecommitdiff
path: root/gsk/ngl/gsknglrenderjob.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-02 18:33:01 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-04-02 18:33:01 -0400
commit54ff4fd45ff6026ea4854f567d7077d9f092e7f2 (patch)
treed25b7b6499de62dc93c48e7b992c397331818837 /gsk/ngl/gsknglrenderjob.c
parent0d135d90f02403afd61d1ca91f2ec188db3e02f5 (diff)
downloadgtk+-54ff4fd45ff6026ea4854f567d7077d9f092e7f2.tar.gz
ngl: Fix downscaled textures
It is not pretty, but at least it works now.
Diffstat (limited to 'gsk/ngl/gsknglrenderjob.c')
-rw-r--r--gsk/ngl/gsknglrenderjob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 1e62b4ecc7..07b61dc151 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -3624,6 +3624,9 @@ gsk_ngl_render_job_visit_node_with_offscreen (GskNglRenderJob *job,
render_target->framebuffer_id);
}
+ if (downscale_x != 1 || downscale_y != 1)
+ gsk_ngl_render_job_push_modelview (job, gsk_transform_scale (NULL, downscale_x, downscale_y));
+
gsk_ngl_render_job_transform_bounds (job, offscreen->bounds, &viewport);
/* Code above will scale the size with the scale we use in the render ops,
* but for the viewport size, we need our own size limited by the texture size */
@@ -3632,8 +3635,6 @@ gsk_ngl_render_job_visit_node_with_offscreen (GskNglRenderJob *job,
gsk_ngl_render_job_set_viewport (job, &viewport, &prev_viewport);
gsk_ngl_render_job_set_projection_from_rect (job, &job->viewport, &prev_projection);
- if (downscale_x != 1 || downscale_y != 1)
- gsk_ngl_render_job_push_modelview (job, gsk_transform_scale (NULL, downscale_x, downscale_y));
prev_alpha = gsk_ngl_render_job_set_alpha (job, 1.0f);
prev_fbo = gsk_ngl_command_queue_bind_framebuffer (job->command_queue, render_target->framebuffer_id);