Webgl Implementation For Xperia™ Phones Released As Open Source

WebGL implementation for Xperia™ phones released as open sourceIn November, we announced that we were the first phone manufacturer in the world to support WebGL in the native Android web browser on Xperia™ phones. As a next step, we are now very excited to release our WebGL implementation for our coming Xperia™ phones running Android™ 4.0 (Ice Cream Sandwich) and above as open source. Read more after the jump, as Anders Edenbrandt, Senior Software Architect, explains more!

Since we announced that we had added support for WebGL in our Android 2.3 (Gingerbread) phones, we have received a lot of feedback from the community. Most of the feedback has been very encouraging, but we have also received comments saying that WebGL needs to get a wider deployment within the Android ecosystem, for the market to take off. This is something we completely agree with.

As a way of encouraging this, and in line with our continuous support of the open developer community and open standards like WebGL and HTML 5, as well as our ambition to be transparent, we have decided to publish our implementation of WebGL for Android 4.0 as open source. This way, it's free for anyone who is interested in using it as is, but it's of course also there as a base for anyone who would like to contribute in further development of the code.

The reason for publishing the implementation of WebGL for Android 4.0, and not the solution we used for our Android 2.3 phones, is that the WebKit code for Android 4.0 is much more recent, and therefore the required modifications are more manageable.

What is required to enable support for WebGL in Android 4.0?
We have published the code to enable support for WebGL in Android 4.0 on the Sony Ericsson Dev Github. You don't need any particular access rights to download the source code, but you must be a fairly advanced developer. To make use of the code, you must be able to build your own Android™ operating system. The code consists of the following files:
•Patched WebKit files to enable WebGL with the hardware accelerated compositing enabled.
•New files that implements the binding between the WebKit and OpenGL on Android.

To enable WebGL, the changes must be applied to the WebKit component in the Android ICS-MR1 release. Right now the code only supports Android 4.0. Please note the work on the code is still in progress, and you can expect changes in the code base until we have launched our first commercial Android 4.0 software for our Xperia™ phones.

We hope to see a lot of interest in this, and many contributions as well. If you would like to contribute to the work with the code, or if you have any questions or comments, feel free to get go to our WebGL thread on the XDA Forum. If you have any direct comments or questions on this post, drop us a line below!