os: add template specialization for alpha pixel

The specialization is needed for applying anti-aliased drawing
operations on alpha channels.
This commit is contained in:
Norman Feske 2017-07-28 15:58:16 +02:00 committed by Christian Helmuth
parent b0935ef9b2
commit cb72784717
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ namespace Genode {
res.pixel = p1.pixel + (((255 - p1.pixel)*alpha) >> 8);
return res;
}
template <>
inline Pixel_alpha8 Pixel_alpha8::mix(Pixel_alpha8 p1, Pixel_alpha8 p2, int alpha)
{
return mix<Pixel_alpha8>(p1, p2, alpha);
}
}
#endif /* _INCLUDE__OS__PIXEL_ALPHA8_H_ */