Accelerated Compositing with Clutter!

I have been working on a new hardware acceleration backend for WebKitGtk+ with Clutter. This is an experimental feature, but after I added Clutter, Cogl, Clutter-gtk to WebKit jhbuild module file, you can try to test it more easily wth WebKit upstream.

Building WebKitGtk+ with Clutter

First thing you have to do is to set WEBKIT_EXTRA_MODULES environment variable as follows:

export WEBKIT_EXTRA_MODULES=webkitgtk-clutter-dependencies,libsecret

If you are using Ubuntu12.04, you should also add libsecret.

Before running build-webkkt script, you need to update all dependent libraries of WebKitGtk+ by running update-webkitgtk-libs script.

$ Tools/Scripts/update-webkitgtk-libs

Then, run build-webkit script as follows:

./Tools/Scripts/build-webkit --gtk --with-acceleration-backend=clutter --no-webgl

You can run the WebKitGtk+ launcher with enabling accelerated compositing as follows:

$ ./Tools/Scripts/run-launcher --gtk --enable-accelerated-compositing

Currently, basic features of CSS 3D transforms, and animations are working, but there are many missing features. Actually, the Clutter backend is already working well in WebKit-Clutter port. I worked on this port before, so the WebKit-Clutter development team(Kov, Changseok) and I are porting accelerated composting code of WebKit-Clutter to WebKitGtk+.

Anyway, the Clutter backend is very important because GTK+4.0 is planing to use Clutter or Cogl as a GDK backend. I expect that the Clutter backend may be able to work better with GTK+4.0

WebKitGtk+ Hackfest 2012

I attended WebKitGtk+ hackfest 2012. This is my third attendance of the hackfest so I was really glad to see our WebKitGtk+ contributors again. Actually, we have met at WebKit contributors meeting, Desktop Summit, and WebKitGtk+ hackfest since 2010. This is another pleasure of working on open source projects.

Anyway, more people attended this hackfest compared to the last hackfest, which shows WebKit and WebKitGtk+ are becoming more important. As you may not know, a lot of embedded devices are using WebKitGtk+ such as DTV, mobile phones, and ebook readers.

I continued to work on the Clutter backend of Accelerated compositing in WebKitGtk+.  In the last hackfest, I completed the implementation, but the patches were not fully upstreamed, so I tried to fix build problems and apply more code to upstream. WebKitGtk+ has 3 backends of Accelerated Composting: the OpenGL backend is enabled by default, the Cairo backend can be used when OpenGL is not supported, the Clutter backend is an experimental backend. The WebKitGtk+ team is planning to embrace Cogl/Clutter when Gtk+ moves to use Clutter/Cogl as a GDK backend in the future, so I believe that the Clutter backend would be important to support Gtk+4.0(?) in WebKitGtk+.

I applied the below patches during the hackfest. It was a very productive time.

Finally, I’d like to thank Intel OTC for giving me the oppertunity to attend the hackfest. In addition, l’d like to thank the GNOME foundation, Igalia, and Collabora for sponsoring the hackfest.