diff options
author | Marcus Comstedt | 2014-01-10 20:02:24 +0100 |
---|---|---|
committer | Marcus Comstedt | 2014-01-10 20:04:10 +0100 |
commit | 4b81b1299da2d81bf457b245b1f8cb3d21c8172f (patch) | |
tree | 22e3ef43a9a8b6ea21d90949dd04e6d759557389 /backends/audiocd/sdl | |
parent | 51d7405a7b741b8028b83e1548b3b8260230c5a1 (diff) | |
download | scummvm-rg350-4b81b1299da2d81bf457b245b1f8cb3d21c8172f.tar.gz scummvm-rg350-4b81b1299da2d81bf457b245b1f8cb3d21c8172f.tar.bz2 scummvm-rg350-4b81b1299da2d81bf457b245b1f8cb3d21c8172f.zip |
GRAPHICS: Fix dest alpha formula in blendPixelPtr
The original alpha computation formula had a problem: If something was
drawn on top of a pixel that was already fully opaque, there would be
an overflow in the computed alpha, and the destination alpha would be
truncated to 0 (fully transparent).
In commit 264ba4a9 this formula was replaced with another one, which
did not have overflows but also was not correct.
This commits introduces a new formula, where the rounding errors have
been turned in another direction; drawing a fully opaque pixel on top
of a transparent one would result in a pixel which is almost, but not
fully, opaque. However, this is no problem in practice, since drawing
fully opaque pixels can be achieved with much less code as a special
case, so add that (also improves rendering speed).
Diffstat (limited to 'backends/audiocd/sdl')
0 files changed, 0 insertions, 0 deletions