diff --git a/repos/os/src/server/nitpicker/resizeable_texture.h b/repos/os/src/server/nitpicker/resizeable_texture.h index 2907f6c537..942d22a841 100644 --- a/repos/os/src/server/nitpicker/resizeable_texture.h +++ b/repos/os/src/server/nitpicker/resizeable_texture.h @@ -16,6 +16,7 @@ /* Genode includes */ #include +#include /* local includes */ #include "chunky_texture.h" @@ -80,6 +81,20 @@ class Nitpicker::Resizeable_texture Texture const &texture = *_textures[_current]; Blit_painter::paint(surface, texture, Point(0, 0)); + + /* copy alpha channel */ + if (_textures[_current]->alpha() && _textures[next]->alpha()) { + + typedef Pixel_alpha8 AT; + + Surface surface((AT *)_textures[next]->alpha(), + _textures[next]->Texture_base::size()); + + Texture const texture((AT *)_textures[_current]->alpha(), nullptr, + _textures[_current]->Texture_base::size()); + + Blit_painter::paint(surface, texture, Point(0, 0)); + } } _textures[_current].destruct();