[cairo] [Pixman] scaling performance test of cairo library
cooolheater
cooolheater at gmail.com
Thu Feb 10 05:42:09 PST 2011
Firstly, I make surface like this:
* uint32_t* dst_buffer = create_buffer32(480*800, 0xffffff00);
cairo_surface_t* dst_surface = cairo_image_surface_create_for_data (
(unsigned
char*)dst_buffer,
CAIRO_FORMAT_ARGB32,
480, 800,
cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, 480));
cairo_t* cr = cairo_create(dst_surface);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
*
Then, I set options using the functions like cairo_set_font_size,
cairo_font_options_set_antialias.
Then, I checked the exection time of these 2 functions:
(gp_text is const char* with 40 characters)
* cairo_move_to(cr, 0, 100);
cairo_show_text(cr,gp_text);*
**
If I use cairo_show_glyphs instead of cairo_show_text, can it be faster?
On Thu, Feb 10, 2011 at 10:14 PM, Chris Wilson <chris at chris-wilson.co.uk>wrote:
> On Thu, 10 Feb 2011 21:59:46 +0900, cooolheater <cooolheater at gmail.com>
> wrote:
> > I also tested for text, and the result was unaccountable.
> >
> > I couldn't find the method for scaling text in skia canvas,
> > so I compared between cairo and skia with differentiating fontsize and
> text
> > length,
> > then the result was the skia is about 10 times faster than cairo in
> drawing
> > text.
> >
> > I think the test was wrong, but I can't find the wrong point.
> > I compared the execution time between SkCanvas::drawText and
> > cairo_show_text.
>
> This surprises me greatly, and I suspect your test as well. ;-)
> Without actually being able to read and run your tests, I can't advise or
> see if we can fix cairo.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110210/89f2761a/attachment.htm>
More information about the cairo
mailing list