[gnome-shell] st-theme-node: Update corner textures on allocation size changes



commit e031a5d28b9d4ea82bd89d1a51bbc2789545a4ba
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 10 02:33:08 2013 +0200

    st-theme-node: Update corner textures on allocation size changes
    
    Commit 318283fc70 optimized box-shadow rendering by not recreating
    shadow materials on every allocation change. Other handles cannot
    be reused and are updated regularly, however the patch missed the
    cached corner materials - while those can be reused, we still need
    to ensure that the currently used paint state references them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703909

 src/st/st-theme-node-drawing.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
index 1a2cea3..0b76f6b 100644
--- a/src/st/st-theme-node-drawing.c
+++ b/src/st/st-theme-node-drawing.c
@@ -1537,6 +1537,15 @@ st_theme_node_update_resources (StThemeNodePaintState *state,
       state->prerendered_texture = st_theme_node_prerender_background (node, width, height);
       state->prerendered_material = _st_create_texture_material (state->prerendered_texture);
     }
+  else
+    {
+      int corner_id;
+
+      for (corner_id = 0; corner_id < 4; corner_id++)
+        if (state->corner_material[corner_id] == COGL_INVALID_HANDLE)
+          state->corner_material[corner_id] =
+            st_theme_node_lookup_corner (node, width, height, corner_id);
+    }
 
   if (had_box_shadow)
     state->box_shadow_material = _st_create_shadow_material (box_shadow_spec,


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