What graphic library does chrome use

13.1k views Asked by At

I know about openGL/directX graphic library that can be used to render graphics. Hardware vendor of Graphic processing unit support these libraries.
I wanted to know about what chrome use to render its stuff.

so i started googling and it came out that:

chrome use webKit to render html page.

and googling for webkit reveals >> webkit is just a frontend.

webkit is just a frontend. It depends on the backend and the hardware support. Google Chrome uses skia as a back-end and is can use software or hardware. So the answer is it depends on the implantation of the back-end and the hardware it is running on. as mentioned on Does WebKit use OpenGL to render CSS transitions?

googling for skia reveals
skia screen shot

Device backends for Skia currently include: what does this means ?
Is it skia is also a frontend/interface and someone else implement it using probably openGL ? or
skia is also a library equivalent to openGL and directX ?


Or a straight forward question be
What library (which is comparable to openGL/directX) does chrome using to render stuff in my computer ?

I am using window 7 on a Dell laptop with no special GPU.

3

There are 3 answers

0
fen On

such thing as a browser has a lot of software layers that make it to work on different hardware and os. One os such layer can be Graphics.

I do not know Skia... but I imagine it is a layer on top of DirectX/OpenGL/GDI that is used to perform rendering.

I think that most of rendering is done using software renderers, only some part is hardware accelerated. That way it will work almost on all devices.

As found here - https://code.google.com/p/skia/ - the library is for 2D rendering and can support different underlying Apis: GL, DX... or even rendering to PDF. So this is built on top of other Gfx apis. Skia is not equal to GL.

3
Andon M. Coleman On

Chrome and Firefox both use ANGLE (Almost Native Graphics Layer Engine) that layers OpenGL ES 2 on top of Direct3D 9 to implement WebGL.

According to the ANGLE website, "Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated Canvas2D implementation and the Native Client sandbox environment."

So, when you ask whether Chrome uses DirectX or OpenGL... the only real way to answer this is, it's a Frankenstein's monster. It's a bit of both, they ultimately want OpenGL ES to be the core graphics subsystem but since it's not available on Windows they decided to start a project that layers ES on top of D3D9.

This seems like a stupid approach to me, as OpenGL would have been even easier to layer on top of. Not surprisingly, many people have reported getting significantly better WebGL performance by disabling ANGLE and going with native OpenGL on Win32.

3
ClayMontgomery On

The underlying graphics library for WebKit is called Cairo. Cairo is mostly a software rendering library, but can use OpenGL or OpenVG for some functions on some platforms. Skia was the main graphics library for early versions of Android, but has been replaced with OpenGL ES. Chrome is a Monster with a lot of layers.