Skip to content
Commit 57d32722 authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Pekka Paalanen
Browse files

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
wayland/weston!889 (comment 1411774)



Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent 932c3747
Loading
Loading
Loading
Pipeline #619134 passed with stages
in 3 minutes and 5 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment