Hacker News new | past | comments | ask | show | jobs | submit login

So OpenGL wasn't allowing partial viewport "dirtying" on macOS. Does that mean Firefox on Linux has an opportunity for a similar gain?



In theory, yes, via the XPRESENT extension and similar mechanisms on Wayland. I don't know how well the drivers and window server optimize it though. (I plan to investigate this at some point.)


Most Wayland compositors track damage obsessively. If you turn on the paint debug overlay in Weston or something wlroots-based and start typing in e.g. gnome-terminal (with blinking cursor turned off), you'll see that only a single character is painted at a time.

Here's a good post: https://emersion.fr/blog/2019/intro-to-damage-tracking/

To do this with EGL, you need to eglSwapBuffersWithDamage(KHR|EXT) instead of just eglSwapBuffers: https://gitlab.freedesktop.org/wayland/weston/blob/23d01c67a... (isn't it nice to have a GL API that's not terrible? :D)

I think I know how to do it, going to try soon. Bugzilled: https://bugzilla.mozilla.org/show_bug.cgi?id=1590586


Firefox on Linux, we remember, is the browser that has software ffmpeg video decode. If you're looking for battery life, you better find some script that can pipe YouTube to VLC and an ad-blocker that allows you to block all videos, all of them.

And, well, then you are probably still using X server with various terrible extensions that are either polluting the graphics card with constantly composing windows as fast as it will go or, not entirely unlikely, doing CPU blits of window buffers. Just to produce an artifact-riddled not-Vsynced mess.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: