[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Denemo-devel] [bug #32550] Breve and longa cause inordinately high cpu
From: |
Richard Shann |
Subject: |
[Denemo-devel] [bug #32550] Breve and longa cause inordinately high cpu usage |
Date: |
Sat, 26 Mar 2011 08:27:11 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.19) Gecko/20080528 Epiphany/2.22 |
Update of bug #32550 (project denemo):
Severity: 3 - Normal => 4 - Important
Status: None => Confirmed
Summary: Breve and longa cause inordinately high cpu usage on
windows xp => Breve and longa cause inordinately high cpu usage
_______________________________________________________
Follow-up Comment #1:
This is not specific to windows. It is probably due to the .svg images being
1000x1000 in "size"
We need cairo expertise to solve this. The code is drawing by calling
cairo_mask(cr, pattern);
on a pattern derived from a 1000x1000 SVG image stored in a file name.svg. The
code to generate the pattern is this:
gchar *filename = g_strconcat(name, ".svg", NULL);
gfloat thescale=0.04, offx=500.0, offy=500.0;
g_print("Scale %f and offset (%f, %f) are chosen to match the set of .svgs
extracted from the emmenthaler fontn", thescale, offx, offy);
RsvgHandle *handle = rsvg_handle_new_from_file(filename, &error);
g_free(filename);
if(handle==NULL) {
if(error)
g_warning("Could not open %s error %sn", basename, error->message);
else
g_warning("Opening %s, Bug in librsvg:rsvg handle null but no error
message",
basename);
return FALSE;
}
RsvgDimensionData thesize;
rsvg_handle_get_dimensions(handle, &thesize);
g_print("size %d x %d", thesize.width, thesize.height);
cairo_surface_t *surface = (cairo_surface_t
*)cairo_svg_surface_create_for_stream (NULL, NULL, (gdouble)thesize.width,
(gdouble)thesize.height);
cairo_t *cr = cairo_create(surface);
cairo_translate(cr, offx, offy);
cairo_scale(cr, thescale, -thescale);
g_print("scaled %f %f %fn", thescale, offx, offy);
rsvg_handle_render_cairo(handle, cr);
rsvg_handle_close(handle, NULL);
g_object_unref(handle);
cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface);
cairo_pattern_reference(pattern);
cairo_destroy(cr);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32550>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Denemo-devel] [bug #32550] Breve and longa cause inordinately high cpu usage,
Richard Shann <=