2

Can anyone tell me how some css3 code (transitions/transformations) get hardware accelerated? In other words, what actually happens when the browser sees css3, what is the pipeline/process involved?

1 Answer 1

2

I don't know the details of the respective implementations, but I'd assume that browsers go through some 3D API to render pages - not just for CSS3 specific things, but for everything. A simple implementation of a transition would render both versions of the transition onto textures, then for each frame draw the second one on top of the first one with increasing opacity.

For transforms, it's as simple as changing the current display matrix (modelview matrix in OpenGL lingo) to produce the desired effect.

Some things that have been in CSS prior to version 3 can also benefit from hardware acceleration; for example, to render anti-aliased glyphs, one could render text onto a texture at, say, 8 times the desired size, then use trilinear filtering (which, again, you basically get for free on 3D hardware) to scale it back down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.