Chromium Tiled Rendering

398 views
Skip to first unread message

Axel Magnuson

unread,
Mar 10, 2015, 3:21:02 PM3/10/15
to graphi...@chromium.org
Okay, so this was sort of tangentially posted here a week ago via a link reference, but I haven't seen any replies to it so I'm formally asking. One of the labs I work in runs a multi-machine monitor wall, and my mission is to alter chromium in order to enable tiled rendering.  The desired result is being able to pass chromium a CLI option, telling it to only render one tile out of a grid, as well as the "virtual" resolution it is rendering in.  In this way multiple chromium processes across multiple machines can render the same page.  We have future ideas for render synchronization over the network, but that would be putting the cart before the horse.

Our original plan was to fork skia and write a new SkCanvas class (something like 'TiledSkCanvas').  It would essentially wrap SkCanvas and just alter the coordinates of render calls, or discard them if they fell outside of the tile responsibility.  Then we could just put something like `#define SkCanvas TiledSkCanvas` in blink's included skia headers and have our tiling.  This plan was of course blown out of the water when we saw how blink is actually organized.  As far as I can tell, skia and blink is highly coupled, and the Skia headers used by blink are actually referred to in the Skia source.

I've also done some proof of concept hacks on SkCanvas, and it looks like it is too low level for what we're looking for.  Tom Hudson seemed to think that the compositor would be the logical place to insert this functionality, but I have to admit that after reading the code I'm struggling to see how tiling functionality would be implemented in the compositor.  (I think that the Tile classes in there refer to a different abstraction than what I'm looking for).

I thought it would be a good idea to just ask the experts what a good way to implement this is.  What do you guys think?  You know this codebase way better than anyone in my lab.

Message has been deleted

Antoine Labour

unread,
Mar 10, 2015, 4:42:03 PM3/10/15
to Axel Magnuson, graphics-dev
SkCanvas are not rasterized in screen space, so it's definitely not the right level to do the sort of tiling you're looking for. The compositor seems like a better place indeed.
Maybe it would be useful to familiarize yourself with the rendering architecture to see where the various pieces fit: http://dev.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome

It would not be very difficult to add a scissor / change the viewport during compositing (we already do essentially that for Android WebView), so that you could achieve viewporting / "virtual resolution". Note however that this wouldn't likely result in a good experience. You'd have to handle input events in every single one of the processes, possibly causing duplicate actions. Also it's not clear that each one of the browsers would receive the same HTML (think ads).

Antoine

Axel Magnuson

unread,
Mar 10, 2015, 4:56:26 PM3/10/15
to Antoine Labour, graphics-dev
Thanks for the input.  I'll familiarize myself with the docs your linked, and then get back to you with more questions.

We're not too concerned with input event or html discrepancies, as we have had some success synchronizing those across multiple chrome instances.  Our needs are academic enough that silky-smooth UX is pretty low on the list of priorities.
Reply all
Reply to author
Forward
0 new messages