[gtk+/wip/baedert/gl: 64/111] gl renderer: Don't render unblurred text shadows to a texture



commit 3b6e29eab933ce9da37e20b6f28a6fdda0097836
Author: Timm Bäder <mail baedert org>
Date:   Fri Dec 1 11:02:26 2017 +0100

    gl renderer: Don't render unblurred text shadows to a texture
    
    We can do the same thing by simply drawing the text in the given shadow
    color.

 gsk/gl/gskglrenderer.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index e356316..782e5b4 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1142,6 +1142,18 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer   *self,
                 continue;
               }
 
+            if (gsk_render_node_get_node_type (child) == GSK_TEXT_NODE)
+              {
+                offset_matrix = builder->current_modelview;
+                graphene_matrix_translate (&offset_matrix, &GRAPHENE_POINT3D_INIT (shadow->dx, shadow->dy, 
0));
+                prev_modelview = ops_set_modelview (builder, &offset_matrix);
+
+                render_text_node (self, child, builder, &shadow->color, TRUE);
+
+                ops_set_modelview (builder, &prev_modelview);
+                continue;
+              }
+
             add_offscreen_ops (self, builder, min_x, max_x, min_y, max_y, child, &texture_id, &is_offscreen);
 
             ops_set_program (builder, &self->shadow_program);


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