<div class="gmail_quote">On Sat, Jul 2, 2011 at 5:28 PM, Cyrille Berger Skott <span dir="ltr">&lt;<a href="mailto:cberger@cberger.net">cberger@cberger.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tuesday 28 June 2011, Cyrille Berger Skott wrote:<br>
&gt; Alternatively, you need to refactor pigment, you have two paths:<br>
&gt; * huge refactoring: the alpha channel is seperated from the color space,<br>
&gt; and RGB and RGBA becomes the same class (or Gray and GrayA), in the paint<br>
&gt; device, the channel is added seperately, and when bitblt, we pass a<br>
&gt; seperate pointer to the alpha channel, that can be null or not (ie like<br>
&gt; the mask)<br>
&gt; * smaller solution: make it possible to create composite op that work<br>
&gt; across color spaces<br>
<br>
</div>There is a third solution<br>
* detect in KoColorSpace::bitBlt that the destination color space is the same<br>
as the source color space without alpha, and add an alpha channel to the data<br>
and then discard it, but that is not going to be performant.<br></blockquote><div><br>I thought about that too, but then you pratically need another paint device in grayscale colorspace than is used for a tempory bitBlt.<br>
Of course that means two bitBlt. <br></div></div><br>