[empathy] rounded-effect: make the rounded rectangle coarser



commit ca4942c2ce0e20d9e930d40f03335ab060645ee1
Author: Fabrice Bellet <fabrice bellet info>
Date:   Tue Dec 20 20:59:58 2016 +0100

    rounded-effect: make the rounded rectangle coarser
    
    The effective size of the preview window allows to significantly
    increase the angle step used to compute the rounded rectangle cogl
    shape, without visual impact. This also gives up a nice speed
    improvement, as internal cogl-path functions are rather expensive
    with a fine grained angle step (parameter unit is degrees).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751185

 src/empathy-rounded-effect.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-rounded-effect.c b/src/empathy-rounded-effect.c
index ce00913..0c9e6d1 100644
--- a/src/empathy-rounded-effect.c
+++ b/src/empathy-rounded-effect.c
@@ -40,8 +40,12 @@ empathy_rounded_effect_paint (ClutterEffect *effect,
 
   cogl_path_new ();
 
-  /* create and store a path describing a rounded rectangle */
-  cogl_path_round_rectangle (0, 0, width, height, height / 16., 0.1);
+  /* Create and store a path describing a rounded rectangle. The small
+   * size of the preview window makes the radius of the rounded corners
+   * very small too, so we can safely use a very coarse angle step
+   * without loosing rendering accuracy. It also significantly reduces
+   * the time spent in the underlying internal cogl path functions */
+  cogl_path_round_rectangle (0, 0, width, height, height / 16., 15);
 
   cogl_clip_push_from_path ();
 


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