[gtk/gtk-4-2: 8/91] ngl: Fix downscaled textures
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-2: 8/91] ngl: Fix downscaled textures
- Date: Tue, 4 May 2021 02:05:40 +0000 (UTC)
commit 88a8287c1d77b24f63ec30d9e74afb159749108d
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 2 18:33:01 2021 -0400
ngl: Fix downscaled textures
It is not pretty, but at least it works now.
gsk/ngl/gsknglrenderjob.c | 5 +++--
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]