Electrolysis update: out-of-process plugins and more

Chris Jones <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
Ben Turner and I have been working on running plugins in separate 
processes (one per plugin shared object), as a first step for the 
Electrolysis project.  This work is ongoing in an experimental m-c 
clone, http://hg.mozilla.org/users/bturner_mozilla.com/libchromiumipc/, 
but will likely move elsewhere soon.  We'll update as this takes shape. 
Also, we will be using mozilla.dev.tech.dom to discuss Electrolysis 
issues, at least for the near future.  And as a quick reminder, we are 
documenting the high level plans and status of Electrolysis here 
(https://wiki.mozilla.org/Content_Processes).

As of late Wednesday the 10th, plugins were at the following state: on 
GTK2/GNU/Linux systems, we can load a single instance of a single plugin 
in windowed mode out of process.  We haven't yet implemented the 
NPRuntime (scripting wrapper for plugins), but theoretically 
non-scripted plugins should be able to load and draw to the screen. 
Unfortunately we haven't observed this yet, because both flash and our 
"test" plugin want the NPRuntime :S.  But most importantly, our IPC 
architecture is starting to come together, and adding NPRuntime support 
should not be a massive burden.  We are ready to start implementing the 
IPDL ("I piddle"), inter-*-communication protocol definition language, 
compiler described somewhat here 
(https://wiki.mozilla.org/IPC_Protocols), although this page is 
outdated, inaccurate, and incomplete.  This language should hopefully 
make writing IPC code more productive and less error prone.

We have a complete short-term story for plugin graphics on X11. 
Windowed plugins are very easy to support, as X windows are identified 
with cross-process XID's; we need only to create the window in the Gecko 
process and ship the ID across to the plugin.  Windowless plugins are 
more difficult to support, but we can reuse som work done for Hildon; 
essentially, we create a window for the windowless plugins and create a 
surface within that window for the plugin to draw to, but use Xdamage 
and Xcomposite to composite the Gecko window with the plugin's window. 
(Graphics folks, if this is a bad summary of this technique, please 
correct me.)  Ben Turner will likely be working on plugin graphics for 
Windows, but we're not yet sure of our approach to plugin graphics for OS X.

In other Electrolysis news, our graphics team has a solid plan of attack 
for multi-process Gecko rendering, both for the short and long terms. 
They will probably document this plan publicly, soon.  Ben Turner is 
also working on creating our "content" process, in which web pages will 
be rendered (as opposed to the "chrome" process in which the Firefox UI 
will reside).  We expect to have an initial prototype of this up and 
running "soon."

Cheers,
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.