Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenGL-accelerated layers, and what they get us

11 views
Skip to first unread message

Joe Drew

unread,
Sep 28, 2010, 6:46:06 PM9/28/10
to dev-pl...@lists.mozilla.org, dev-pl...@lists.mozilla.org
I've been asked to explain what we're getting in exchange for the
risks of turning on OpenGL.

First, it's important to know what we're talking about. By "OpenGL" I
mean OpenGL accelerated layers. Layers are, as you may know from reading
my blog post[1], a technology that lets Gecko's layout engine separate
different parts of web pages into independently rendered regions that we
can composite on to your screen. It's this last step, the composition,
that benefits from hardware acceleration.

Right now, layer acceleration is most useful when resizing images and
video (for example, HD WebM video on YouTube being resized to fit in
their little player, which in software-only mode can stutter on
lower-end systems), when playing video (we offload part of the video -
specifically, the YCbCr->RGB conversion-to the GPU, in addition to the
scaling part mentioned earlier), and when we're composing lots of things
that use transparency (a good example of this is Patrick Finch's blog[2]).

Further, it gives us a great platform on which to build. Layers
acceleration gives us an excellent way to harness what GPUs are best at,
which is scaling and compositing, without significantly changing the
rest of our drawing code. Right now it's got some strange performance
problems that we have to wrap our heads around sooner than later, but I
don't expect them to be insurmountable. (In the end, we should at all
times be no worse than software-only mode, and we should be able to get
much, much faster on certain cases that are very difficult for software
to do quickly.)

Finally, we currently have layers acceleration on Windows using Direct3D
9 (and, soon, Direct3D 10) - this is simply bringing us up to feature
parity on OS X.

I hope this explains things for people. Please let me know if I haven't
been clear or if you have other questions!

Best,

Joe


1. http://blog.mozilla.com/joe/2010/05/25/hardware-accelerating-firefox/
2. http://patrickfinch.com/

0 new messages