[gtk/wip/chergert/glproto: 299/493] blurred inset shadow needs transformed rect




commit 67d1149b93577c9bb82c3d814a5cf73c90bbe046
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 28 23:05:16 2021 -0800

    blurred inset shadow needs transformed rect

 gsk/next/gskglrenderjob.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index ba0d11cc1a..417178495a 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -1878,6 +1878,7 @@ gsk_gl_render_job_visit_blurred_inset_shadow_node (GskGLRenderJob *job,
   if (blurred_texture_id == 0)
     {
       float spread = gsk_inset_shadow_node_get_spread (node) + half_blur_extra;
+      GskRoundedRect transformed_outline;
       GskRoundedRect outline_to_blur;
       GskGLRenderTarget *render_target;
       GskGLRenderState state;
@@ -1930,6 +1931,8 @@ gsk_gl_render_job_visit_blurred_inset_shadow_node (GskGLRenderJob *job,
       gsk_gl_command_queue_bind_framebuffer (job->command_queue, render_target->framebuffer_id);
       gsk_gl_command_queue_clear (job->command_queue, 0, &job->viewport);
 
+      gsk_gl_render_job_transform_rounded_rect (job, &outline_to_blur, &transformed_outline);
+
       /* Actual inset shadow outline drawing */
       gsk_gl_program_begin_draw (job->driver->inset_shadow,
                                  &job->viewport,
@@ -1939,7 +1942,7 @@ gsk_gl_render_job_visit_blurred_inset_shadow_node (GskGLRenderJob *job,
                                  job->alpha);
       gsk_gl_program_set_uniform_rounded_rect (job->driver->inset_shadow,
                                                UNIFORM_INSET_SHADOW_OUTLINE_RECT,
-                                               &outline_to_blur);
+                                               &transformed_outline);
       gsk_gl_program_set_uniform_color (job->driver->inset_shadow,
                                         UNIFORM_INSET_SHADOW_COLOR,
                                         gsk_inset_shadow_node_get_color (node));


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