Random notes on making Gecko's canvas go fast on XO...

Mihai Sucan mihai.sucan at gmail.com
Tue Apr 7 09:42:03 EDT 2009


Le Tue, 07 Apr 2009 14:15:36 +0300, Martin Langhoff
<martin.langhoff at gmail.com> a écrit:

> Over the last few weeks there's been growing interest in using the
> support for HTML5's Canvas present in Browse.xo. A very quick test
> felt fairly slow, but Alex and his colleagues are interested in
> studying, profiling and working towards a solution.
>
> So here's some notes I've collected for them -- it's not my area of
> expertise anyway, so it'd be great to hear from others.
>
> Cairo and 565 surfaces. The XO display doesn't use 8-bits per RBG
> channel (aka 888). Instead, it downsamples colours to 565 (is that
> still true?). If the whole stack is using 565, then we avoid costly
> downsampling, and generally hit the fast paths...
> http://lists.laptop.org/pipermail/sugar/2007-April/002247.html
>
> Thread about X / Cairo optimisation
> http://lists.laptop.org/pipermail/devel/2008-December/022042.html
>
> Profiling tools
> http://wiki.laptop.org/go/Performance_tuning
>
> Something to play with - a simple Canvas and SVG benchmark
> http://www.borismus.com/canvas-vs-svg-performance/

Hello Martin!

This is great stuff. I am really confident some serious performance gains  
will be made in regards to Canvas on desktops and mobile  
devices/laptops/netbooks. As Peter pointed out, Mozilla is doing lots of  
work for Fennec, work which impact the overall performance of the Gecko  
platform.

Since my last email I got to work on an important part of PaintWeb for  
GSOC 2009: keyboard shortcuts support.

If you look closely into the current code of PaintWeb, there's a method  
named ev_keypress_prepare which is marked with a TODO label, needing lots  
of improvements and testing.

Now I have worked on a new method to help with cross-browser compatibility  
for keyboard events in Web browsers. I have integrated the new code into  
libmacrame and I'll reuse it into PaintWeb (note that I will not use the  
entire lib, just this part). I have done lots of testing and now it works  
in Opera, Firefox, Safari, Konqueror and MSIE.

You can see the code at:
http://code.google.com/p/libmacrame/updates/list

The KeyboardEvent.getKey() method will be part of the new code in  
PaintWeb, after code reorganization.


Best regards,
Mihai


-- 
Mihai Sucan
http://www.robodesign.ro



More information about the Devel mailing list