3 ms·
> Because all scroll content needed to be bitstreamed then. Is it better now? Can a browser locally scroll an image, without restreaming it?
by bmacho 1y ago
> Because all scroll content needed to be bitstreamed then.
Is it better now? Can a browser locally scroll an image, without restreaming it?
- londons_explore 1y agoA modern browser (ie. chromium) uses the GPU for all drawing. Here is an awesome (slightly outdated) talk about the architecture: https://groups.google.com/a/chromium.org/g/blink-dev/c/AK_rwEp61ME?pli=1 https://groups.google.com/a/chromium.org/g/blink-dev/c/AK_rw... The basic idea is that HTML content is drawn in transparent 'tiles' which are layered on top of one another. When the user scrolls, the tiles don't need to be redrawn, but instead just re-composited at their new positions. GPU's are super fast at that, and even a 15 year old GPU can easily do this for tens of layers at 60 FPS. On a linux with a remote X server, I think the tiles would all end up on the X server, with only the pretty small 'draw tile number 22 at this location' going across the network. So the answer to your question is 'yes'.
- lxgr 1y agoDoes all of that (i.e. GPU rasterization and GPU compositing) really work over the network with common browsers? Based on my limited experience, the performance of running Firefox remotely on a local X11 server was very poor, and I assumed that the absence of these types of acceleration were to blame. I could imagine XRender to work, though, which would at least support blitting most of the pixels up/down in case of scrolling, and would only require pushing new ones over the network for any newly exposed areas.
- londons_explore 1y agoA quick test shows that chromium at least cannot use the GPU with a remote X connection. Loading the google homepage is ~100 megabytes of data across the X connection, and scrolling up and down for a few seconds sends a further 1 gigabyte. My guess is the lack of shared memory buffers stops the use of opengl, and whilst it's theoretically possible, it is probably unimplemented because nobody does that in 2025.
- ianburrell 1y agoGLX used to work with remote X, what is called indirect rendering, but it sounds like it stopped working recently. Maybe doesn't support recent OpenGL, or nobody uses it so nobody maintains it.
- rbanffy 1y agoCould as well be that everyone forgot it existed.
- toast0 1y agoI don't think this has worked well in quite some time. Maybe not ever in open source land. IMHO, widespread use of Xlib lead people to believe that X was much more synchronous than it is, and discouraged people from using networking, and then a lot of stuff that could be possible didn't get made. xcb is a much better way to interact with X, but it may have arrived too late.
- kmeisthax 1y ago[dead]
- aidenn0 1y agoIt's much worse. Now fonts are rendered in the client then streamed over the network to the server as bitmaps.
- ianburrell 1y agoXRender extension can load font glyphs into the X server and do the rendering locally. But that requires the browser, the X client, to know about this and not do rendering itself.
- ianburrell 1y agoI think the XRender extension allows scrolling images. XRender allows quick recompositing of text and images. But this requires the browser have a special path for remote X and not just use the GPU. Or even just a path for X that lets the X Server do the rendering.
- jandrese 1y agoIn theory you can send the images over as X backing stores and do just that. But I'm not sure it was implemented that way. I remember GTK 1 was well optimized for X and you could run GTK applications over slow modem lines quite comfortably. GTK 2 went a different direction entirely and became almost unusable over the Internet. I doubt GTK 3 or 4 are any better now that they're designed for compositors.