app_server: fix direct assignment in alpha pixel composite

* 'alpha' is 16 bit (alpha * cover) in blend_hline_alpha_pc(), so
  compare with 255 * 255
This commit is contained in:
Julian Harnath
2015-08-23 01:00:23 +02:00
parent 01c7304204
commit ed7b139e08
@@ -52,7 +52,7 @@ blend_hline_alpha_pc(int x, int y, unsigned len,
rgb_color color = pattern->ColorAt(x, y); rgb_color color = pattern->ColorAt(x, y);
uint16 alpha = color.alpha * cover; uint16 alpha = color.alpha * cover;
if (alpha) { if (alpha) {
if (alpha == 255) { if (alpha == 255 * 255) {
ASSIGN_ALPHA_PC(p, color.red, color.green, color.blue); ASSIGN_ALPHA_PC(p, color.red, color.green, color.blue);
} else { } else {
BLEND_ALPHA_PC(p, color.red, color.green, color.blue, alpha); BLEND_ALPHA_PC(p, color.red, color.green, color.blue, alpha);