Vladimir Vukićević — Words
 

Archive Page 3



It’s been a while since I posted a progress update (or really any blog post, ahem), but porting Firefox/Fennec to Android is progressing at a good clip. After working out a few kinks (and setting the all-important “you’re allowed to touch the network” permission), I just got our first page load:

Mouse events sort of work, toplevel windows sort of work, keyboard doesn’t work yet but shouldn’t be hard to hook up.  This is running in an emulator at the moment for ease of debugging, but it’s working just fine on physical hardware as well.

You’ll note that this is the full Firefox interface, and not the Fennec/Firefox Mobile UI; we’re testing with the full interface because it’s significantly more complex than the mobile UI and stresses Gecko much more.  So, if the full UI works, then Fennec should work fine as well.  Given the interest in Android on netbook and tablet devices, an updated version of the full Firefox UI might find a home on some of these.  Android has been pretty great to work with so far; it’s a bit unusual platform for us due to its Java core, but with the NDK we’re able to bridge things together without many problems.

We’re still a ways  to go before any kind of usable alpha release, but we’re certainly one step closer.  We’ll also be able to accelerate our progress now that we have some of the basic scaffolding in place.  I know I’m looking forward to running Fennec on my Droid, and there are tons of Android devices coming out that should be great platforms for Fennec.

WebGL Draft Goes Public

WebGLI’m pretty excited to have the WebGL draft spec available for review and comments today.  There’s still plenty of time for feedback, but we’re far enough along to be able to solicit meaningful feedback.  There are multiple implementations, which is a much better state than the early Canvas 3D work where things only worked during a full moon after saying “OpenGL” three times backwards into your monitor!

We’re actively working through remaining warts and edge cases (and they are a lot of them!).  Take a look at the official Khronos WebGL landing page and Arun’s blog post for more information, including where to go to sign up for the public mailing list and for a set of resources about WebGL.

I just checked in a patch from Mark that renames WebGL’s Canvas*Array objects to be WebGL*Array, to match the current state of the spec.  The APIs remain the same, so it should be a matter of search-and-replace to update.  Should show up in tomorrow’s nightly builds of Firefox.

WebGL Goes Mobile

One of the goals of WebGL was always to enable the functionality on both desktop and mobile devices.  This is one of the reasons why OpenGL ES 2.0 was chosen as a starting point for the capabilities exposed by the spec.

We’ve had support for WebGL in Firefox desktop nightlies for a few weeks now, but soon I hope to have it enabled on Firefox for mobile devices (code name Fennec) as well.  Jay demonstrated some simple demos working on Nokia’s N900 at the ARM techcon3 today a few weeks ago (took a while to get the video done!), and I’ve grabbed a quick video showing things in action.

This should be showing up in Firefox for mobile devices nightly builds, so we’ll see some more interesting things running on phones soon!

More Android Hackery

Just a heads up; I’ve started a wiki page on the Android port.  Day-to-day details can still be found on the status board, but the wiki page should remain a current landing spot.  Sadly, we’re not yet at a point where there are neat screenshots to show, but soon!

Today’s Android hacking notes

Bionic doesn’t support dlopen(NULL, …) to get access to a handle to the currently running program.  In fact, it really doesn’t support it, and crashes should you try to do that perfectly normal thing.  Should you really need that, though, you can potentially hack it as seen here.  I ended up not needing to do this, but it’s there should we need it in the future.

Also, to get all the happy debugging symbols, you can set gdb’s solib-search-path to the symbol-rich versions of the binaries built as part of an android build, at source/out/target/product/generic/symbols/system/lib:source/out/target/product/generic/symbols/system/bin .. this will let you debug all the way from initial program entry in the linker down into whatever libraries you call.  If you don’t have symbols, gdb will often lie about $pc when using gdbservers.