[webkit-dev] Help regarding rendering in webkit2 port of haiku

Noam Rosenthal noam at webkit.org
Mon Jun 10 05:46:49 PDT 2019


On Mon, Jun 10, 2019 at 10:33 AM Adrien Destugues <pulkomandy at pulkomandy.tk>
wrote:

> On Mon, Jun 10, 2019 at 09:37:06AM +0300, Noam Rosenthal wrote:
> > ~ (reposting from webkit email)
>
> Hi,
>
> Another limitation we hit on some websites is that it is not possible
> for us to create too many drawable offscreen bitmaps. There is a
> system-wide limit of 4096, which can be hit rather easily on Google
> Maps, for example. So we will probably need a way to limit the use of
> drawable bitmaps when possible. Maybe coordinated graphics would help
> here, if it allows to share a single drawing context and bitmap, rather
> than creating a separate one for each rendering layer.
>

I would consider using CoordinatedGraphics with something like a display
list, where the drawing commands are sent via webkit2 to the UI process and
then everything is painted in the UI process in one go. This would be the
most memory-stingy approach, though it would mean zero acceleration and
would cancel out any benefit of compositing - compositing uses memory to
reduce drawing commands but when memory is what's expensive there's no
point in that... you would need to play with this to get the best
memory/cpu cost/benefit.


>
> On the way drawing works for us: the drawing primitives are all
> implemented in our display server, there is no rendering done client
> side in webkit processes. This means the display server has a pointer to
> the bitmap data already, and ideally it would be able to pass this from
> one application to another without needing to copy all the data. We may
> need to make some changes to our display server to allow this, but
> that's fine (it's the nice thing about Haiku, if we need to change
> something in the OS, we can do that easily).
>
> Now we have to find out if coordinated graphics or some other way to do
> things makes sense, and for this we have to understand how the rendering
> work is split between web process and ui process, and what kind of data
> they expect to exchange between them. Especially in our case where the
> bitmap data is in fact already shared with the OS display server, so if
> UI process does not do any drawing by itself, it doesn't actually need
> to access the data.
>
> --
> Adrien.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20190610/ebe0fc70/attachment.html>


More information about the webkit-dev mailing list