diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-12-20 20:59:58 +0100 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2016-12-21 10:55:52 -0600 |
commit | ca4942c2ce0e20d9e930d40f03335ab060645ee1 (patch) | |
tree | 92fad608f787778c107ebe7aa57e78ec79d0f359 | |
parent | fddeee2d8257a72a701e766dc221afb55c09c2a6 (diff) | |
download | empathy-ca4942c2ce0e20d9e930d40f03335ab060645ee1.tar.gz |
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
-rw-r--r-- | 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 ce009133e..0c9e6d1d2 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 (); |