[gtk/wip/chergert/glproto: 242/493] fix alpha when only drawing cross-fade end node




commit 445a29e129e805510d7dd5639ddc5a6b6c6fb9e6
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 26 11:50:54 2021 -0800

    fix alpha when only drawing cross-fade end node
    
    we saved the alpha, but never applyed the modified alpha

 gsk/next/gskglrenderjob.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index fc8f4afd5f..a35e0568d0 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -2454,8 +2454,11 @@ gsk_gl_render_job_visit_cross_fade_node (GskGLRenderJob *job,
   if (!gsk_gl_render_job_visit_node_with_offscreen (job, end_node, &offscreen_end))
     {
       float prev_alpha = job->alpha;
+
+      job->alpha = job->alpha * progress;
       gsk_gl_render_job_visit_node (job, start_node);
       job->alpha = prev_alpha;
+
       return;
     }
 


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