What graphic library does chrome use [closed]
Asked Answered
P

3

7

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.

Powys answered 11/9, 2013 at 9:21 Comment(0)
R
4

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.

Ridenhour answered 11/9, 2013 at 19:52 Comment(3)
This is informative... But i think i was not able to put my question clear enough.... "when you ask whether Chrome uses DirectX or OpenGL" i am not asking in context of webGL, but the chrome UI and simple web pages.Powys
@user2410148: Yeah, so was I. It uses ANGLE for Canvas2D (HTML5 rendering) as well.Ridenhour
But what does Chrome use for rendering simple things, such as buttons, labels, fields etc.?Unnamed
D
0

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.

Dint answered 11/9, 2013 at 11:17 Comment(0)
A
-4

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.

Arel answered 11/9, 2013 at 21:24 Comment(3)
Skia has not been replaced, it is still used by Android and Chrome, see code.google.com/p/skia. OpenGL ES is a lower layer, which sometimes used by Skia (and perhaps also used directly for 3D/WebGL/etc).Heredia
Chrome has always been using Skia (not Cairo) as its 2D drawing library on all platforms.Housefather
I'm talking about WebKit here, not Chrome specifically, and yes the original, fundamental graphics library is Cairo. Skia has not been completely replaced (yet) but is headed in that direction as the newer versions of the Android platform are increasing using OpenGL ES instead.Arel

© 2022 - 2024 — McMap. All rights reserved.