A good week for text and graphics

glyph-pixmaps

Carl‘s glyph-pixmaps work has been merged to xserver. This provides a speedup for text rendering by hashing and caching glyph data to avoid constant re-uploads. Eric Anholt breaks it down for us.

Cairo and XShm

Shared memory has had a bad rap when it comes to X11, and it’s been found in the past that it doesn’t provide a significant performance benefit over sockets at the transport level (SMT).

However, when it comes to image data, XShm can provide a “sensible performance optimization” by avoiding gratuitous copies. To take advantage of this, you need to do a little work to ensure that the data can be shared directly with the X server. Chris Wilson has just proposed a patch to support this in Cairo.

WebKit and complex text

I’ve started work on support for complex text in WebKit/Gtk+ using Pango. This includes support for non-Western writing systems.

WebKit Pango Thumbnail

To continue today’s performance theme, it’s worth noting that WebKit provides two code paths for text rendering:

  1. Blazing flast: Known as the CG path on OS X, this path caches glyph data and avoids expensive computations wherever possible. In the GTK+ port, this code path requires direct use of the font-system on every supported platform. Luckily, it turns out the WebKit code base already has optimised text implementations for several platforms, which we can just borrow and plug in to our own port.
  2. Fast: The ATSUI path on OS X, this path is capable of complex text rendering, while still providing opportunities for caching layout information from previous text runs. Here, we use Pango, along with a few clever tricks.

A heuristic is applied to detect which code path can be used. Since the capabilities of Pango are slightly different to ATSUI, this may yet need some tweaking to avoid more fallbacks then are necessary.

Posted in GNOME, WebKit | 4 Comments

WebKit/Gtk+ gets a reviewer, and Canvas support

WebKit/Gtk+ gets a reviewer

I am now an official WebKit reviewer. This should help speed up development of the Gtk+ port. Thanks go to Apple and the WebKit team!

Canvas support using Cairo

WebKit Cairo Canvas - Instant (2)A few hours ago I landed support for the Canvas HTML element, rendered using Cairo (just like everything else in the browser engine, including ordinary content and SVG graphics). This feature paves the way for significant bling, with WebKit having been the originator of the Canvas standard for use in the Mac OS X Dashboard.

This screenshot demonstrates some dynamic frame/rotation/shadow effects applied to an image on the Web.

Public API refactoring

I’ve now re-factored WebKit/Gtk+’s public API so that the types are named WebKitPage, WebKitFrame etc. This looks and feels a lot better than the old naming convention, and is part of an ongoing effort to provide an elegant and seamless GObject C API for the browser engine. I’ve also updated the Epiphany browser and the EAL wrapper to track these changes so disruption to these projects should be minimal. If you are not having fun embedding WebKit/Gtk+ in your application we’ve done something wrong!

A special thanks

Mark Rowe (who works at Apple) can be considered godfather of the Gtk+ port. He has provided unfaltering enthusiasm and patch review since I started hacking on the browser over a year ago, and last night stayed up till 5AM making sure the Gtk+ port worked on the upcoming feature branch. Earlier that day, he had been hacking on GdkPixbuf image and animation loading support (which has unfortunately stalled since the GdkPixbufAnimation API is something of a black box).

Moving on

In other news, I’ve left Collabora Ltd. for something completely different (update: Nuanti). Do try to avoid sending email to my old work address. I believe they are hiring someone to continue their WebKit/Gtk+ contracting business. (Other aspiring GNOME companies that have started to contribute to WebKit/Gtk+ include Imendio and Igalia.)

P.S. I left a little treat for you guys in the office :-)

Posted in GNOME, WebKit | 6 Comments

All good things

Just about two years ago when I was living in Edinburgh, university researcher Harry Halpin and I set up a space in the basement of an old church/the Forest Cafe with the goals of promoting and supporting Free Software and independent media. Within a few weeks, I’d sat down with colleague Ronan Huggard, and after an all-night brainstorming session, came up with a name for this rapidly growing organisation: InfoSeed. The name embodied the ethos of the group, which existed to sow the seeds of information, allowing technology enthusiasts and independent journalists to work together and get things done.

InfoSeed logoPerhaps the most important aspect of InfoSeed for me was that it broke the hegemony of the university in matters of computing and opened its doors to the wider community. As former president of the Edinburgh University Computing Society, I’d seen first-hand that, while our constitution did cater for non-students, university societies were simply not set up to support local Edinburgh residents and passers-by in the same capacity as they were able to accommodate students themselves. In this way, societies were a dead end to me, kind of an in-club for those who were studying at the right place at the right time. InfoSeed was my chance to get things right, second time round.

I hope to blog in the future about the history of InfoSeed including its formation around the time of the G8 Gleneagles summit, the development of excellent IT infrastructure on a shoestring budget, the software we used and wrote, the physical restoration of a dank undercroft into a warm and welcoming walk-in centre for Free Software and Open Source enthusiasts, open six days a week with scheduled opening hours, the events we hosted, and our relations with other like-minded organisations.

Then there are the stories of how we got dozens of Linux laptops to African schools, how we weaned journalists off proprietary office suites and audio/video editing software, how we showed countless passers-by that the world of computing was not incompatible with their desires for world peace, saving the whales or whatever personal aspirations they happened to have in life; that computing, programming and technology are in fact very human and social persuasions.

InfoSeed location mapEach of these is an epic tale, and would ideally only have been the first chapter of a much greater work. However, unless something changes I will have to refer to InfoSeed in the past tense since, today, I’m having to write about the imminent closure of the InfoSeed Free Software lab. If you live in Edinburgh, are studying there or have any interest in this kind of space, do drop by and check it out while you still can. Money may be most helpful (InfoSeed as an organisation is no longer able to pay the bills for the two rooms it’s based out of), but fresh blood and enthusiasm would be welcome, since with new faces and ideas there is a case for raising more funds and thus a stay of execution. The InfoSeed website and mailing list are the first points of contact if you want to get in touch.

If the doors of InfoSeed do close for the last time, it will by no means have been a failed experiment, but a great success that spread free and open computing to people who would otherwise never have heard of it, and one that has touched the lives of the volunteers who put in so much time and effort (verging on the obsessive in some cases, you know who you are!). I wonder if InfoSeed could continue function as a disembodied Internet forum, or whether its entire value — what made it a first for Scotland — was that it was a physical venue with real people willing to work together in the same place to show the world that there’s more to computing and technology than they ever imagined?

Posted in InfoSeed | Leave a comment

WebKit/Gtk+ at LinuxConf Europe 2007

Yesterday’s talk on WebKit/Gtk+ at LinuxConf Europe was well received, and I was particularly impressed by the turnout considering that it was scheduled against Linus’ git BOF next door. The audience had more questions than there was time for, but those that I was able to answer were split mostly between questions about mobile performance/footprint and standards compliance.

The talk covers some of the history of both the WebKit browser engine and the WebKit/Gtk+ port, looks at the ethos of the developer community and explores current and planned features, such as SVG, Canvas and audio/video. It goes into detail about work involving the Nokia N800 internet tablet and Maemo as well as a brief look at integration work being done by the OpenMoko project, the state of play with OLPC and, of course, GNOME’s Epiphany web browser and Devhelp documentation browser.

WebKit/Gtk+ cover slide

Download WebKit/Gtk+ talk slides

Posted in GNOME, Maemo, WebKit | 12 Comments

WebKit Maemo port, N800 and the EAL

I’ve been working with George Wright the last few days to integrate the WebKit/Gtk+ browser engine into Nokia’s recently announced EAL (Engine Abstraction Layer).

WebKit EAL, cairographics.orgSelecting a browser engine

WebKit/Gtk+ will soon be joining Opera and Mozilla as a well-supported alternative browser for the Maemo platform. I believe we are the first to provide SVG support:

 

It’s exciting to hear the Red Hat guys have been experimenting with WebKit/Gtk+ on the OLPC platform — J5 is a competent engineer and his comments have helped to give us direction for further development.

Given also the recent activity on Epiphany/WebKit, these are good signs that we’re working towards a usable browser engine both for mobile devices and the desktop, but there are still features to be implemented and bugs to fix, and I encourage those interested to get stuck in to the WebKit bug tracker, whether filing bugs or contributing patches.

Great credit goes also to Holger Freyther of the OpenMoko project, who is co-maintaining WebKit/Gtk+ upstream in Apple’s SVN repository along with me (we completed paperwork with Apple to become SVN committers about a month ago) and has been dealing with some particularly involved parts of the port involving scrolling, frames and native widgetry.

Posted in GNOME, Maemo, WebKit | 8 Comments

GUADEC: The first day

Sunday came and went in Birmingham. This was an opportunity to meet many of my colleagues face to face for the first time.

Managed D-Bus talk went very well. Huge interest from the usual suspects, but also from the wider GNOME community. Packed room, engaging audience.

Sundays are usually quite boring, but this one was an exception. After talks, lead a jazz crawl across the pubs and bars of the city — it seems we caught the end of the 23rd Birmingham International Jazz Festival 2007.

Managed D-Bus slide

Download Managed D-Bus talk slides

Posted in GNOME, Mono | Leave a comment

WebKit/Gtk+ is coming

The WebKit Gtk+/Cairo port has recently had a burst of activity — it’s really starting to shape up. I’ve recently had the opportunity to coordinate my efforts on the port and in the last couple of weeks we’ve provided patches for over a dozen bug reports (often requests for enhancement) . Most importantly, we’ve decided to work with the WebKit team to keep contributions going directly into the upstream SVN repository — no more dead-end forks and “development branches”.

I started working on the port half a year ago after giving up on gtkmozembed in a fit of frustration and was immediately impressed by the competence of the WebKit team and the abstractions they’ve made on top of the browser core to make porting a breeze — WebKit boasts successful and actively maintained “ports” to Qt, Wx, Gtk+, Mac OS X and Windows. These guys know what they’re doing and have rapidly learnt how to lead a successful Open Source project. Porters often work together and each of the ports share various modules and backends — GNOME developers are known to work with qmake, KDE hackers have picked up amounts of Gtk+ knowhow and Apple engineers often provide build fixes and small feature enhancements for the contributed modules.

The engine is incredibly versatile, and, as the name suggests, one of its strong points is seamless integration into existing desktop applications. We are concentrating on the mobile GNOME platform right now, and even without any profiling, the prototype browser is competitive with Opera, particularly for complex interactive sites using AJAX and modern CSS features. Moreover, we see a future for WebKit as a component of new applications like Banter that are blurring the boundaries between rich Web content and the GNOME desktop.

One of our upcoming contributions will add support for WebKit’s KSVG2-based SVG functionality using Cairo:

WebKit SVG

This is distinct from existing Cairo SVG libraries like librsvg in that JavaScript has full access to the DOM here, much like the current Gecko development trunk.

Posted in GNOME, Maemo, Mono, WebKit | 4 Comments