Commit e4dcce9
Remove debug info
Changed files (10)
modifiedlibbirdfont/BirdFontFile.valamodifiedlibbirdfont/EditPoint.valamodifiedlibbirdfont/EditPointHandle.valamodifiedlibbirdfont/Glyph.valamodifiedlibbirdfont/GlyphCollection.valamodifiedlibbirdfont/Path.valamodifiedlibbirdfont/Renderer/FallbackFont.valamodifiedlibbirdfont/Renderer/FontCache.valamodifiedlibbirdfont/Renderer/Text.valamodifiedlibbirdfont/VersionList.vala
Diff
@@ -1136,16 +1136,12 @@ class BirdFontFile : GLib.Object { foreach (Tag t in tag) { if (t.get_name () == "glyph") { parse_glyph (t, gc, name, unicode, selected_id, unassigned);- - print (@"g e2: $(gc.get_current ().ref_count)\n"); } } if (new_glyph_collection) { font.add_glyph_collection (gc); }- - print (@"g 2: $(gc.get_current ().ref_count)\n"); } private int parse_selected (Tag tag) {@@ -1214,10 +1210,8 @@ class BirdFontFile : GLib.Object { glyph.version_id = (has_id) ? id : (int) gc.length () + 1; gc.set_unassigned (unassigned); - print (@"i parse_glyph $(glyph.ref_count)\n"); gc.insert_glyph (glyph, selected || selected_id == id); glyph = new Glyph.no_lines ("");- print (@"i2 parse_glyph $(glyph.ref_count)\n"); } private Path parse_path (Tag tag) { @@ -188,7 +188,6 @@ public class EditPoint : GLib.Object { } n_points++;- print (@"n_points: $(n_points)\n"); } ~EditPoint () {@@ -100,8 +100,6 @@ public class EditPointHandle : GLib.Object { this.selected = false; n_handles++;- - print (@"EditPointHandle $(n_handles)\n"); } ~EditPointHandle () {@@ -121,9 +121,7 @@ public class Glyph : FontDisplay { left_limit = -28; right_limit = 28; - n_instances++;- - warning (@"glyphs $name: $(n_instances)");+ n_instances++; } public Glyph.no_lines (string name, unichar unichar_code = 0) {@@ -133,7 +131,6 @@ public class Glyph : FontDisplay { path_list.add (new Path ()); n_instances++;- warning (@"glyphs no lines $name: $(n_instances)"); } static int n_instances = 0;@@ -26,9 +26,7 @@ public class GlyphCollection : GLib.Object { public GlyphCollection (unichar unicode_character, string name) { this.unicode_character = unicode_character; this.name = name;- print (@"GlyphCollection: $(ref_count)\n"); versions = new VersionList (null, this);- print (@"Afer version list GlyphCollection: $(ref_count)\n"); } public GlyphCollection.with_glyph (unichar unicode_character, string name) {@@ -38,10 +36,7 @@ public class GlyphCollection : GLib.Object { this.name = name; g = new Glyph (name, unicode_character);- - print (@"GlyphCollection: $(ref_count)\n"); versions = new VersionList (g, this);- print (@"Afer version list GlyphCollection: $(ref_count)\n"); } ~GlyphCollection () {@@ -69,9 +64,7 @@ public class GlyphCollection : GLib.Object { } public void insert_glyph (Glyph g, bool selected) {- print (@"Before VersionList $(g.ref_count)\n"); versions.add_glyph (g, selected);- print (@"After VersionList $(g.ref_count)\n"); assert (versions.glyphs.size > 0); } @@ -97,7 +97,6 @@ public class Path { } n_paths++;- print (@"Paths: $n_paths\n"); } ~Path () {@@ -112,7 +112,6 @@ public class FallbackFont : GLib.Object { public Font get_single_glyph_font (unichar c) { Font f = load_glyph_from_ttf (c);- print (@"font e1 : $(f.ref_count)\n"); return f; } @@ -123,24 +122,15 @@ public class FallbackFont : GLib.Object { bf_font = new Font (); - if (bf_font != null)- print (@"font e1 a : $(((!)bf_font).ref_count)\n");- for (int i = fallback_fonts.size - 1; i >= 0; i--) { f = fallback_fonts.get (i); font = open_font ((!) f.get_path ()); bf_font = get_glyph_in_font ((!) font, c); - if (bf_font != null)- print (@"font e1 b : $(((!)bf_font).ref_count)\n");- close_font (font); if (bf_font != null) {- if (((!)bf_font).get_glyph_by_name ((!) c.to_string ()) != null)- print (@"first: $(((!) ((!)bf_font).get_glyph_by_name ((!) c.to_string ())).ref_count)\n");- return (!) bf_font; } }@@ -154,8 +144,6 @@ public class FallbackFont : GLib.Object { BirdFontFile bf_parser; Font bf_font = new Font (); - print (@"font e1 before load : $(bf_font.ref_count)\n");- gc = new GlyphCollection (c, (!)c.to_string ()); glyph_data = load_glyph (font, (uint) c); @@ -163,17 +151,9 @@ public class FallbackFont : GLib.Object { return null; } - print (@"font e1 before parser : $(bf_font.ref_count)\n"); bf_parser = new BirdFontFile (bf_font);- print (@"font e2 before parser1 : $(bf_font.ref_count)\n"); bf_parser.load_data (((!) glyph_data).str);- print (@"font e1 before parser load : $(bf_font.ref_count)\n");-- if (((!)bf_font).get_glyph_by_name ((!) c.to_string ()) != null)- print (@"after parser: $(((!) ((!)bf_font).get_glyph_by_name ((!) c.to_string ())).ref_count)\n");- bf_parser = new BirdFontFile (new Font ());- print (@"font e1 after remove parser : $(bf_font.ref_count)\n"); return bf_font; }@@ -112,8 +112,6 @@ public class FontCache { } if (g == null && name.char_count () == 1) {- return null; //FIXME- f = fallback_font.get_single_glyph_font (name.get_char (0)); g = f.get_glyph_by_name (name); @@ -124,48 +122,8 @@ public class FontCache { top_limit = f.top_limit; base_line = f.base_line; bottom_limit = f.bottom_limit; - - GlyphCollection? gc = f.get_glyph_collection (name);- if (gc != null) {- print (@"GC BEFORE UNREF: $(((!)gc).ref_count)\n");- }- - print (@"before bad unref: $(((!)g).ref_count)\n");- //((!)g).unref (); //FIXME: - f = new Font (); // FIXME DELTE- print (@"after bad unref: $(((!)g).ref_count)\n");-- if (gc != null) {- print (@"GC AFTER UNREF: $(((!)gc).ref_count)\n");- }-- }- - print (@"font in get_glyph_by_name: $(f.ref_count)\n");-- - if (g != null) {- print (@"b: $(((!)g).ref_count)\n"); } - - Glyph tg;- - // FIXME: DELETE- tg = new Glyph ("");- print (@"tg: $(tg.ref_count)\n");- - {- GlyphCollection tgc = new GlyphCollection ('\0', "");- tgc.add_glyph (tg);- - print (@"after add tg: $(tg.ref_count)\n");- - tgc.versions.glyphs.clear ();- }- - print (@"DONE tg: $(tg.ref_count)\n");- return g; } @@ -58,13 +58,11 @@ public class Text : Widget { set_font_size (size); set_text (text); - warning (@"ntext: $(ntext)"); ntext++; } ~Text () { ntext--;- warning (@"remove ntext: $(ntext)"); } public void use_cache (bool cache) {@@ -26,8 +26,6 @@ public class VersionList : DropMenu { public VersionList (Glyph? g = null, GlyphCollection glyph_collection) { base (); - print (@"VersionList: glyph_collection: $(glyph_collection.ref_count)\n");- this.glyph_collection = glyph_collection; glyphs = new Gee.ArrayList<Glyph> (); set_direction (MenuDirection.POP_UP);