[gtk+/wip/baedert/gl: 64/95] gl renderer: Only draw blurred shadow nodes once
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 64/95] gl renderer: Only draw blurred shadow nodes once
- Date: Sun, 10 Dec 2017 21:28:21 +0000 (UTC)
commit c4a035c24e5fb69fd4734140d6e23c12d417d294
Author: Timm Bäder <mail baedert org>
Date: Sat Dec 2 11:17:46 2017 +0100
gl renderer: Only draw blurred shadow nodes once
gsk/gl/gskglrenderer.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 41fa4a0..6e9ad71 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1247,10 +1247,17 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
gsize n_shadows = gsk_shadow_node_get_n_shadows (node);
guint i;
- /* TODO: shadow nodes are most commonly used for text and icon shadows.
- * In both cases, we can avoid the RTT case!
- * if the child is neither a text node nor a texture node though, we need
- * to fall back to rendering it to a texture and then applying the shadow on that one.*/
+ /* TODO: Implement blurred shadow nodes */;
+ for (i = 0; i < n_shadows; i ++)
+ {
+ const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i);
+
+ if (shadow->radius > 0)
+ {
+ render_fallback_node (self, node, builder, vertex_data);
+ return;
+ }
+ }
for (i = 0; i < n_shadows; i ++)
{
@@ -1260,13 +1267,7 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
graphene_matrix_t offset_matrix;
graphene_matrix_t prev_modelview;
- /* TODO: Implement blurred shadow nodes */;
- if (shadow->radius > 0)
- {
- /* TODO: This draws the entire node, not just one shadow. */
- render_fallback_node (self, node, builder, vertex_data);
- continue;
- }
+ g_assert (shadow->radius <= 0);
if (gsk_render_node_get_node_type (child) == GSK_TEXT_NODE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]