weston/libweston
Pekka Paalanen 57d32722a2 gl-renderer: simplify main() in frag
By moving the application of view_alpha after pre-multiplication we can
simplify main() considerably.

The cost is that for straight-alpha input or color_pipeline() we might
be doing three multiplications more than before. However,

 a) the cost of running color_pipeline() probably dominates anyway, and
 b) to get straight-alpha input you have to use a future Wayland
   extension that probably won't be advertised without color management.

So we keep the optimization for the simple case (no color management)
while potentially incurring a small cost on the heavy case (with color
management).

Thanks to Pierre-Yves Mordred for the inspiration in
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/889#note_1411774

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-06-22 12:15:58 +00:00
..
2022-03-03 17:00:15 -06:00
2022-03-03 17:00:15 -06:00
2022-03-03 17:00:15 -06:00
2021-07-31 15:28:20 +00:00
2022-03-15 11:32:46 +02:00