[gnome-contacts] Avatar: unnecessary Cairo save() and restore()



commit 7d4f03acd90ef6509c2fa9c3567be1505a34c6e4
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Wed Jan 24 00:36:32 2018 +0100

    Avatar: unnecessary Cairo save() and restore()

 src/contacts-avatar.vala |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/src/contacts-avatar.vala b/src/contacts-avatar.vala
index f7c4c6f..521f566 100644
--- a/src/contacts-avatar.vala
+++ b/src/contacts-avatar.vala
@@ -77,8 +77,6 @@ public class Contacts.Avatar : DrawingArea {
   }
 
   public override bool draw (Cairo.Context cr) {
-    cr.save ();
-
     // This exists to implement lazy loading: i.e. only load the avatar on the first draw()
     if (!this.avatar_loaded)
       load_avatar.begin ();
@@ -88,8 +86,6 @@ public class Contacts.Avatar : DrawingArea {
     else // No avatar available, draw a fallback
       draw_fallback (cr);
 
-    cr.restore ();
-
     return true;
   }
 


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