mmlr + stippi:

Found an incompatibility with BeOS, where Haiku behaves correctly, though,
after our changes: The alpha channel of B_RGB32 bitmaps is ignored, but
B_TRANSPARENT_MAGIC_RGBA32 pixels are considered fully transparent. In BeOS,
B_RGB32 are simply treated as B_RGBA32, but only in B_OP_ALPHA. We have
added a comment as well as the code that would enabled the BeOS behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26436 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-07-15 18:18:07 +00:00
parent 29ad53f16a
commit f01b70d098

View File

@ -1430,8 +1430,20 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
BBitmap* temp = NULL;
ObjectDeleter<BBitmap> tempDeleter;
if ((format != B_RGBA32 && format != B_RGB32)
|| (format == B_RGB32 && fDrawingMode != B_OP_COPY)) {
|| (format == B_RGB32 && fDrawingMode != B_OP_COPY
#if 0
// Enabling this would make the behavior compatible to BeOS, which
// treats B_RGB32 bitmaps as B_RGB*A*32 bitmaps in B_OP_ALPHA - unlike in
// all other drawing modes, where B_TRANSPARENT_MAGIC_RGBA32 is handled.
// B_RGB32 bitmaps therefore don't draw correctly on BeOS if they actually
// use this color, unless the alpha channel contains 255 for all other
// pixels, which is inconsistent.
&& fDrawingMode != B_OP_ALPHA)
#endif
) {
temp = new (nothrow) BBitmap(actualBitmapRect, B_BITMAP_NO_SERVER_LINK,
B_RGBA32);
if (temp == NULL) {