Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The irony is that in 2025, this answer is now wrong again. Starting with smartphones, scanout hardware supports multiple planes/overlays again that are composited on the fly by fixed function blocks. This bypasses having to power on the GPU and wasting memory bandwidth (a large amount of power use in a smartphone). No longer involves hacks with green pixels though.




Right, because we have alpha channels now

Not necessary for blending in video overlays, and wasteful. Well, necessary inside the overlay if that is where the controls should appear. Alpha blending is two reads, one write per pixel, for the whole affected region (whatever that is, could be the whole screen). An opaque overlay is one read, one write, only for every pixel in the desired rectangle.

The video overlays in question are not drawn by blending into a framebuffer in memory. They're two separate display planes that are read in parallel by the display path, scaled, and blended together at scan-out time. There are only reads, no writes. Modern GPUs support alpha-blended display planes using the alpha channel that is otherwise often required to exist anyway as padding.

As OP noted, using hardware display planes can have efficiency advantages for cases like floating controls over a video or smoothly animating a plane over a static background, since it avoids an extra read+write for the composited image. However, it also has some quirks -- like hardware bandwidth limits on how small a display plane can be scaled.


Yeah sorry, you're right of course: hardware planes are directly scanned out without going through the main framebuffer.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: