[gtk/wip/chergert/glproto: 394/526] actually use the blit program




commit fce56d6c5a4b7d8b66b18efe1bd4eb831fc349c7
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 1 16:34:40 2021 -0800

    actually use the blit program
    
    we can't be loading vertices without a current program, so its unclear
    to me what allowed this to work in the previous code in terms of ensuring
    a blit was about to occur.

 gsk/next/gskglrenderjob.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 4bcf496727..ad4ed31d61 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -2898,7 +2898,19 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job,
 
   if (!gsk_gl_render_job_visit_node_with_offscreen (job, top_child, &top_offscreen))
     {
+      gsk_gl_program_begin_draw (job->driver->blit,
+                                 &job->viewport,
+                                 &job->projection,
+                                 gsk_gl_render_job_get_modelview_matrix (job),
+                                 gsk_gl_render_job_get_clip (job),
+                                 job->alpha);
+      gsk_gl_program_set_uniform_texture (job->driver->blit,
+                                          UNIFORM_SHARED_SOURCE,
+                                          GL_TEXTURE_2D,
+                                          GL_TEXTURE0,
+                                          bottom_offscreen.texture_id);
       gsk_gl_render_job_load_vertices_from_offscreen (job, &node->bounds, &bottom_offscreen);
+      gsk_gl_program_end_draw (job->driver->blit);
       return;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]