[webkit-gtk] Is accelerated compositing (AC) successfully supported in webkitgtk2.4.9/webkit2 with X11 as backend?
Huang Xinsheng
Xinsheng.Huang at nagra.com
Tue Mar 15 23:11:26 PDT 2016
Thanks a lot, Carlos.
The libGL.so.1 is already successfully linked to WebKitWebProcess in my build.
In webkitgtk2.4.9 ./Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp, the following function enterAcceleratedCompositingMode is NOT implemented.
#if USE(ACCELERATED_COMPOSITING)
void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext&)
{
notImplemented();
}
So, it seems AC is still NOT fully implemented in webkitgtk2.4.9.
When I load page with “export WEBKIT_FORCE_COMPOSITING_MODE=1” or not, it both runs into this function. So, it seems AC is already on.
But, the page still shows as expected. It is strange because this function enterAcceleratedCompositingMode is NOT implemented.
Anyway, I will stop research on it, and turn to use webkitgtk2.10.7, thank you.
Best Regards
Eric
-----Original Message-----
From: webkit-gtk-bounces at lists.webkit.org [mailto:webkit-gtk-bounces at lists.webkit.org] On Behalf Of Carlos Alberto Lopez Perez
Sent: 2016年3月9日 20:51
To: webkit-gtk at lists.webkit.org
Subject: Re: [webkit-gtk] Is accelerated compositing (AC) successfully supported in webkitgtk2.4.9/webkit2 with X11 as backend?
On 09/03/16 08:47, Huang Xinsheng wrote:
> Thanks, Michael. You do help a lot.
> For MiniBrowser using webkit2, how can we forcibly using GPU in AC (if GPU is available) when running the AC case?
> Is there any necessary code change when building webkitgtk or MiniBrowser?
> AC case:
> https://webkit.org/blog-files/3d-transforms/poster-circle.html
>
> Best Regards
> Eric
If you have built WebKitGTK+ with either -DENABLE_GLES2=ON (if your GPU supports OpenGL ES 2.0) or with -DENABLE_OPENGL=ON (if it supports the full OpenGL API) then it should be enabled.
To double-check, you can also check if the WebKitWebProcess binary is linked against your GL libraries. Example:
$ ldd /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitWebProcess | grep GL
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f3208c10000)
libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f3208907000)
If you want to make AC to be always on and avoid entering/exiting from AC mode depending on the contents of the website you can set this environment variable before executing the browser (only works with webkitgtk+ 2.10 or newer):
export WEBKIT_FORCE_COMPOSITING_MODE=1
Note: this will not make AC work if for some reason it is not working.
It will just prevent the browser from exiting AC mode if AC is working.
More information about the webkit-gtk
mailing list