From cb7278471702509a0f3d4dd2243c55535c02ffaf Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 28 Jul 2017 15:58:16 +0200 Subject: [PATCH] os: add template specialization for alpha pixel The specialization is needed for applying anti-aliased drawing operations on alpha channels. --- repos/os/include/os/pixel_alpha8.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/os/include/os/pixel_alpha8.h b/repos/os/include/os/pixel_alpha8.h index aa410c99bc..6056c1d2a7 100644 --- a/repos/os/include/os/pixel_alpha8.h +++ b/repos/os/include/os/pixel_alpha8.h @@ -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(p1, p2, alpha); + } } #endif /* _INCLUDE__OS__PIXEL_ALPHA8_H_ */