After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689400 - st-private: Don't create attr lists if we don't need them
st-private: Don't create attr lists if we don't need them
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-01 01:44 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-12-03 01:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-private: Don't create attr lists if we don't need them (2.54 KB, patch)
2012-12-01 01:44 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-12-01 01:44:44 UTC
See patch. This is one half of preventing extraneous relayouts from
being queued. This reqiures the Clutter half of the patch to be useful:
bug #689399 .
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-12-01 01:44:46 UTC
Created attachment 230370 [details] [review]
st-private: Don't create attr lists if we don't need them

Decorations are fairly uncommon in gnome-shell, so it's
worthwhile to avoid effort creating empty attr lists. This
can also help prevent a relayout.
Comment 2 Giovanni Campagna 2012-12-02 22:05:42 UTC
Review of attachment 230370 [details] [review]:

Almost

::: src/st/st-private.c
@@ +209,3 @@
   clutter_text_set_attributes (text, attribs);
 
+  g_clear_pointer (&attribs, pango_attr_list_unref);

if (attribs) pango_attr_list_unref();
and you avoid the atomic access.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-12-03 01:12:10 UTC
Attachment 230370 [details] pushed as 7e5f1fe - st-private: Don't create attr lists if we don't need them


Pushed with suggested changes